Generate PDFs from your HTML templates with one POST request. Pass Handlebars context as JSON and get back a URL to the file.
Overview
You create a template in Templar (HTML with Handlebars). The render API loads that template for your account, merges your data object, produces a PDF, and responds with JSON that includes a full absolute url to the file use that value directly; you do not need to combine it with a separate base. Each successful render consumes one credit.
Authentication
Every request must include a valid key in the Authorization header using the Bearer scheme (same as the in-app playground).
Endpoint
Request body
Success
On 200, the body matches what the playground shows in the response panel: a JSON object with a downloadable PDF location and a short message.
The client parses JSON from the response text; if parsing fails, the playground falls back to a raw text wrapper, your integration should prefer checking res.ok and reading json.error on failures.
Errors
Error bodies use { "error": "…" } with the messages below (same strings returned by the API).
| Status | Meaning |
|---|---|
| 401 | Missing or invalid API key (Unauthorized) |
| 402 | No credits remaining. |
| 400 | Invalid JSON, missing templateName, invalid data, or bad pageSize |
| 404 | Template not Found. |
Try the interactive playground with your real templates, or copy generated snippets for Node.js, cURL, Python, Go, Ruby, and Java.