Skip to main content
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

Use either 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 http and https addresses
  • Private or internal URLs are blocked
  • waitTimeout cannot 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 file
  • options: optional JSON string with the same PdfOptions object
Example: