Render a document
renderCreates a document by filling a stored template, or ad-hoc html, with data: a PDF or image, or DOCX, PPTX or PDF from Word and PowerPoint templates. Returns the render with status and download_url.
Instructions
Creates a document by filling a stored template, or ad-hoc html, with data: a PDF or image, or DOCX, PPTX or PDF from Word and PowerPoint templates. Returns the render with status and download_url. Use it to make a document from data; to turn an existing office file into a PDF, use convert_to_pdf. Stored templates render their published version, so one whose published_version is null fails with template_not_found. Every call is a new render: a live key consumes units, a test key is free (watermarked on the Free plan). A render that fails returns status failed and an error with code and message; validate_template finds most causes beforehand. With einvoice the PDF becomes a ZUGFeRD / Factur-X e-invoice built from data._invoice (check the block with check_invoice first): the render then carries einvoice, the validator's report, and a refused invoice names the fields and rules to fix. The link expires at expires_at; get_render issues a fresh one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Values for the template, shaped as get_template_schema describes; leave out when it needs none | |
| html | No | A complete HTML document to render instead of a stored template, up to 5 MB | |
| wait | No | Most renders are finished when the call returns; true also waits for one that continues in the background, false returns it as it is (queued or rendering) to check later with get_render | |
| engine | No | Template language of html, when it contains expressions to fill from data | |
| locale | No | BCP 47 tag for helpers and translations, e.g. de-DE | |
| output | No | Left out, the template decides: PDF for PDF templates and html, its image format for image templates, its default output for Word and PowerPoint templates. Word templates render docx or pdf, PowerPoint templates pptx or pdf | |
| einvoice | No | Makes the PDF a ZUGFeRD / Factur-X e-invoice whose XML is built from data._invoice: true for the defaults, an object to choose, false to switch off what the template declares. PDF only; live renders from the Starter plan, test keys on Free make 20 marked ones a day | |
| filename | No | Name of the file behind download_url, e.g. invoice-2026-0042.pdf | |
| template | No | Slug or tpl_ id of a stored template; pass this or html |