---
title: "POST /api/export/pdf"
method: POST
path: "/api/export/pdf"
---

# POST /api/export/pdf

`POST /api/export/pdf`

## Headers

- `Marimo-Session-Id` string, required

## Request body

- ExportAsPDFRequest
  - `includeInputs` boolean
  - `includeOutputs` boolean
  - `preset` 'document' | 'slides'
  - `webpdf` boolean, required

## Response `200`

Export the notebook as a PDF

## Other responses

- `400` — File must be saved before downloading
- `500` — Export failed or dependencies missing

## Changes

> 60 revisions in range; 1 could not be searched.

- **2026-07-30** `6c5023b41528` — 3 warning, 1 info
  - removed the request property `rasterScale`
  - removed the request property `rasterServer`
  - removed the request property `rasterizeOutputs`
  - added the new optional request property `includeOutputs`

[Change history](https://skmtc.dev/marimo-team/apis/marimo-api/changes/api/export/pdf/post.md)

---

[API](https://skmtc.dev/marimo-team/apis/marimo-api.md) · [All operations](https://skmtc.dev/marimo-team/apis/marimo-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/marimo-team/marimo-api/revisions/a39082aac3ce/schema)
