Page Rendering
URL to PDF
Convert a live URL into a print-ready PDF document.
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
Body parameters
string
required
The page to convert.
https:// is assumed if the scheme is omitted.string
default:"desktop"
Layout viewport before printing:
desktop or mobile.string
default:"a4"
Paper size:
letter, legal, a0, a1, a2, a3, a4, a5, or a6.string
default:"portrait"
portrait or landscape.string
default:"light"
Emulated
prefers-color-scheme while rendering: light or dark.Response
boolean
required
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.integer
required
Size of the generated PDF.
integer
required
Total server-side time for the conversion.
Response headers
In addition to the standard headers, this endpoint sends:string
HIT if served from the short-lived result cache without re-rendering, otherwise MISS.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.