Parse

Render a document as PDF

POST
/api/v1/preview

Render a document as PDF

Convert a document into a PDF suitable for inline preview.

Accepts a file upload (multipart/form-data), a document URL, or a file_id referencing a document already ingested in the platform (JSON body). The conversion is synchronous — the PDF bytes are returned directly.

Supported file types: .pdf, .png, .jpg, .jpeg, .pptx, .ppt, .odp, .docx, .odt, .doc, .html, .xhtml

Size limit: 20 MB.

Authorization

bearerAuth
AuthorizationBearer <token>

Console session token (Authorization: Bearer <session>) or product API key (Authorization: Bearer <api-key> or x-api-key). Session tokens are validated via Better Auth get-session; API keys against the shared database.

In: header

Header Parameters

authorization?string|null
x-api-key?string|null

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/pdf

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/preview" \  -H "Content-Type: application/json" \  -d '{    "document": "https://example.com/report.docx"  }'
"string"