Skip to main content
POST
Renders a URL with headless Chromium and prints it to a paginated PDF: navigates, waits for the network to settle, scrolls to trigger lazy-loaded content, waits for images and fonts to finish, then prints. The finished file is written to temporary storage and its filename returned.
2 credits per call · Typical response time ~340ms

Body parameters

url
string
required
The page to convert. https:// is assumed if the scheme is omitted.
deviceType
string
default:"desktop"
Layout viewport before printing: desktop or mobile.
pageFormat
string
default:"a4"
Paper size: letter, legal, a0, a1, a2, a3, a4, a5, or a6.
orientation
string
default:"portrait"
portrait or landscape.
theme
string
default:"light"
Emulated prefers-color-scheme while rendering: light or dark.

Response

success
boolean
required
filename
string
required
Name of the generated PDF. Download it from /api/uploads/<filename> on the same host — the file is temporary and removed after roughly 5 minutes.
sizeBytes
integer
required
Size of the generated PDF.
durationMs
integer
required
Total server-side time for the conversion.

Response headers

In addition to the standard headers, this endpoint sends:
X-Pdf-Cache
string
HIT if served from the short-lived result cache without re-rendering, otherwise MISS.
Server-Timing
string
Per-stage breakdown (queue, page, nav, net, scroll, settle, render, total, all in ms).

Errors

See the full error reference for the platform-level codes (401, 402, 429) that apply to every endpoint.