The playground

Try any of 919 endpoints — live.

Pick an endpoint, load a working example, tweak the params, and send — no signup to try. Results render the way the data deserves; raw JSON, headers & code are one tab away.

Playground demo key · api.reefapi.com
post/generate/v1/pdf_render4 credits

Render a PDF from inline HTML/CSS (Jinja2) or a built-in template_name + data (invoice/receipt/certificate/report). WeasyPrint, fonts pinned, network-off. Output: inline base64 (≤8MB) or one-time download token.

Working example
Parameters

Inline HTML/CSS document (Jinja2 syntax allowed; rendered in a SANDBOXED env — no code execution). Mutually exclusive with template_name.

Built-in PDF template (stateless — lives in engine, not stored). Supply `data` matching its contract (see template_list).

Template variables (JSON object) — merged into the template. For built-ins see each template's data_contract.

Page size override for built-in templates.

Suggested download filename.

Comma-separated https hosts whose images/CSS the PDF may fetch (default NONE = network-off, SSRF-safe). Use data: URIs to embed assets without this.

request preview
curl -X POST https://api.reefapi.com/generate/v1/pdf_render \
  -H "x-api-key: $REEF_KEY" \
  -H "content-type: application/json" \
  -d '{"template_name":"invoice","data":"{\"company\":{\"name\":\"Acme\"},\"items\":[{\"description\":\"Widget\",\"qty\":2,\"unit_price\":9.5}],\"subtotal\":19,\"total\":19}"}'

Hit Send to run this endpoint live.