Render a template
render_templateGenerate a PDF from a saved or built-in template and JSON data, returning it as base64 or saving it to a local path.
Instructions
Render a saved or built-in template with JSON data into a PDF. Returns it like render_pdf.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | A template id from list_templates, e.g. "tpl_…" or "invoice". | |
| data | No | The values the template uses. | |
| test | No | Test render: watermarked, free, not counted against the quota. | |
| options | No | Page options that override the template's own (format, margin, …). | |
| save_to | No | Write the file to this path on this machine instead of returning it as base64. The folder must exist. Use it for large files. | |
| filename | No | File name for the Content-Disposition header. | |
| overwrite | No | Replace the file at save_to if it already exists. Default false. |