PPDFInvoiceAPI
DOCS/ PDFInvoiceAPI documentation

GETTING STARTED

PDFInvoiceAPI documentation

One endpoint, HTML in, PDF out. Send raw HTML or a template and get application/pdf back in roughly 400ms — no headless-Chrome cluster to run.

PDFInvoiceAPI is a single synchronous call:POST /v1/render. Send HTML (or a template plus data) and you get the raw PDF bytes back in the response. It runs on Cloudflare's edge, so there are no servers, browsers, or queues for you to operate.

How it works

Every request authenticates with a Bearer API key and returnsapplication/pdf directly — stream it to a file, a browser, or storage. Each successful render costs one credit. Here's the whole thing:

curl https://api.pdfinvoiceapi.com/v1/render \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "html": "<h1>Invoice #1024</h1><p>Total: €1,240.00</p>" }' \
  -o invoice.pdf

Two ways to render

  • Raw HTML — pass a self-containedhtml string. See Rendering HTML.
  • Templates — pass an inline template with{{ }} placeholders plus data, or a stored template id (tpl_…) you save once and render by id. SeeTemplates.

Control page size, margins, and orientation withPDF options. On paid plans the rendered PDF is clean — see Remove branding.

Next steps

Sign up gives you 100 free render credits — no card.

Get your API key