POST /convert/html-to-pdf supports three practical workflows:
- Send inline HTML as JSON
- Upload an HTML file as multipart form data
- Render a public URL and capture the result as PDF
When To Use Each Mode
JSON Contract
html or url, never both in the same request.
Important Limits
- Authenticated HTML payloads and HTML uploads are limited to 10 MB
- URL mode only accepts public
httpandhttpsaddresses - Private or internal URLs are blocked
waitTimeoutcannot exceed 30000 ms- Credit cost is 1 for inline HTML or file upload, 2 for URL mode
Common PDF Options
Multipart Upload Shape
When uploading an HTML file, send:file: the HTML fileoptions: optional JSON string with the samePdfOptionsobject