{"slug":"api-pdfzen-site-v402-render-pdf-7b885c","title":"Render a PDF","host":"api.pdfzen.site","method":"POST","resource":"https://api.pdfzen.site/v402/render/pdf","category":"other","description":"Render a PDF. Pass `template` (one of 45 starter slugs: invoice, receipt, contract, certificate, nda, letter, report, quote, purchase-order, lease-agreement, resume, lab-report, boarding-pass, menu, bank-statement, etc.) or `html` (raw Handlebars HTML). Returns application/pdf bytes. $0.006 USDC per","price_listed":0.006,"price_asked":null,"state":"effects","state_label":"Not tested: has real-world effects","checks_7d":0,"answered_7d":0,"latency_ms_median":null,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"data":{"company":{"address":"1 Market St, SF","name":"Acme Inc."},"currency":"USD","customer":{"email":"ap@globex.com","name":"Globex Corp."},"invoice":{"dueDate":"2026-06-14","issueDate":"2026-05-14","number":"INV-2026-001"},"items":[{"description":"Q2 consulting","qty":40,"rate":150},{"description":"Onsite training","qty":1,"rate":1200}]},"template":"invoice"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"data":{"description":"Variables for the template's Handlebars context. Shape depends on the chosen template — call GET /v1/starters/:slug to fetch the expected `sampleData` for any starter.","type":"object"},"filename":{"description":"Optional. Sets Content-Disposition filename on the response — useful when the PDF is delivered to a browser via an HTTP intermediary.","examples":["invoice-INV-2026-001.pdf"],"type":"string"},"html":{"description":"Raw Handlebars-flavoured HTML. Use only when no starter fits (one-off bespoke layouts). Prefer `template` for consistency. Either `template` or `html` is required.","examples":["<h1>Hello, {{name}}</h1><p>Total: {{total}}</p>"],"type":"string"},"pageOptions":{"description":"PDF page setup: format (A3/A4/A5/Letter/Legal/Tabloid), landscape, margin, scale, displayHeaderFooter. Most starters ship sensible defaults.","examples":[{"format":"A4"},{"format":"Letter","landscape":true}],"properties":{"format":{"enum":["A3","A4","A5","Letter","Legal","Tabloid"],"type":"string"},"landscape":{"type":"boolean"},"margin":{"type":"object"}},"type":"object"},"store":{"description":"When true, persist the PDF and return X-Document-Id response header for later retrieval via /v1/documents/:id/download. Default false.","type":"boolean"},"template":{"description":"Slug of a built-in starter template. 45 available; GET /v1/starters lists them all (no auth, no payment). Either `template` or `html` is required.","examples":["invoice","receipt","certificate","contract","nda","letter","report","resume","boarding-pass","menu"],"type":"string"}},"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[],"description_full":"Render a PDF. Pass `template` (one of 45 starter slugs: invoice, receipt, contract, certificate, nda, letter, report, quote, purchase-order, lease-agreement, resume, lab-report, boarding-pass, menu, bank-statement, etc.) or `html` (raw Handlebars HTML). Returns application/pdf bytes. $0.006 USDC per render, no API key, no signup. Full catalog: GET /v1/starters (free). Agent docs: https://pdfzen.site/docs/agents/tools","last_updated":"2026-09-17T03:43:53.685Z","schemes":["exact"]}