Documentation
Endpoints
Reference for every public endpoint, parameters and responses.
Conversion
| Method | Path | Input |
|---|---|---|
| POST | /pdf/html | JSON: html, optional css |
| POST | /pdf/url | JSON: url |
| POST | /pdf/markdown | JSON: markdown |
| POST | /pdf/office | multipart: file |
| POST | /screenshot | JSON: html or url |
Account
| Method | Path | Returns |
|---|---|---|
| GET | /me | Plan, limits and remaining pages |
| GET | /health | Service and engine status |
Common options
| Field | Type | Default | Notes |
|---|---|---|---|
paper | string | object | A4 | A4, A5, Letter, Legal or {width,height} in inches |
margin | object | 0.4in | top, bottom, left, right |
printBackground | boolean | true | Includes CSS backgrounds |
landscape | boolean | false | Swaps paper orientation |
header / footer | string | — | HTML. Use .pageNumber, .totalPages, .title |
waitForSelector | string | — | Waits until the selector exists before printing |
timeoutMs | number | 30000 | 1,000–60,000 |
filename | string | generated | Used in Content-Disposition |
Example: invoice with a footer
POST /pdf/html
{
"html": "<h1>Invoice 1042</h1><table>…</table>",
"paper": "A4",
"margin": { "top": "0.5in", "bottom": "0.7in", "left": "0.5in", "right": "0.5in" },
"footer": "<div style='font-size:9px;width:100%;text-align:center'>Page <span class='pageNumber'></span> of <span class='totalPages'></span></div>",
"filename": "invoice-1042.pdf"
}Example: public URL
POST /pdf/url
{
"url": "https://example.com/report/2026",
"waitForSelector": "#report-ready",
"landscape": true
}URL safety
URLs must be public and resolve to a public IP address. Private ranges, loopback, link-local, .local and .internal hostnames are rejected with 403 forbidden_url. Embedded credentials are not allowed.
Need something not covered? Contact support.