Automette docs

Get a render

GET
/api/v1/renders/{id}

Authorization

ApiKeyAuth
AuthorizationBearer <token>

API key from Settings → API Keys.

In: header

Path Parameters

id*string

Query Parameters

download?boolean

Redirect to the file. Only works when status is completed.

format?string

Select which format to download when multiple formats were requested. Defaults to the first file.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/renders/string"
{  "id": "cm4rnd7qh0001jx04w8e2t5va",  "self": "https://automette.com/api/v1/renders/cm4rnd7qh0001jx04w8e2t5va",  "status": "completed",  "url": "https://cdn.automette.com/p/cm4rnd7qh0001jx04w8e2t5va/document.pdf",  "format": "pdf",  "template_id": "cm4tpl8e20001js04xq2v9k3m",  "template_name": "Invoice",  "webhook_url": "https://your-app.com/hook",  "webhook_deliveries": [    {      "id": "cm4wdl4rs0001jy04t2f8k6mc",      "event_id": "evt_abc123",      "source": "render_webhook",      "http_status": 200,      "success": true,      "error": null,      "created_at": "2026-04-22T12:00:01.000Z"    }  ],  "data": {    "invoice_number": "INV-0042"  },  "error": null,  "created_at": "2026-04-22T12:00:00.000Z"}

Generate a document POST

Generates a PDF or image from a template and your data. **Async (default)** — returns `202 Accepted` immediately with `status: "pending"`. Poll `GET /api/v1/renders/{id}` until `status` is `completed`, or set `webhook_url` to receive a callback and skip polling entirely. **Sync** — set `async: false`. Returns `200 OK` with a completed render if it finishes within 30 seconds. If the render takes longer, the request returns `202` with `status: "pending"` and the render finishes in the background — fall back to polling exactly like async mode. A sync timeout is **not** an error. **Visibility:** - `public` — file is served from CloudFront. The `url` in the response is the final, cacheable, shareable URL. No auth required to open. Best for embedding in emails, social posts, or public web pages. - `secure` — file is served via a short-lived presigned URL. The `url` in the response points to `/api/v1/renders/{id}?download=true`, which you call with your API key to get a fresh download link. Best for sensitive documents (invoices, contracts). **Output formats** — all engines support multiple output formats in one request. Use `format` (single string) or `formats` (array) to specify. Allowed values by engine: Typst `pdf`, `png`, `jpg`; Canvas `png`, `jpg`, `webp`, `pdf`; DOCX `pdf`, `docx`. Defaults to `pdf` for Typst/DOCX and `png` for Canvas. The response always includes a `files` array — one entry per output file. **Filename patterns** — the `filename_pattern` field accepts `{field_key}` placeholders and built-in tokens: `{template}`, `{date}`, `{time}`, `{datetime}`, `{random}`. Defaults to `{template}-{datetime}-{random}`. **Non-string data values** (numbers, booleans, arrays, objects) are auto-serialized to JSON strings before being passed to the renderer.

Sign an on-demand URL POST

Generates a signed URL that renders a template on first request and serves from CDN forever after. The URL is HMAC-signed so it cannot be tampered with. No API key is required to fetch it — paste it into `<img src>`, an email, or a share link. Signing also pre-warms the render so the first visitor hits a cached file, not a cold render. You pay the credit at sign time; visitors pay nothing. The signature is computed over `(url_base, data, format)`. Two calls with the same data return the same signed URL and hit the same cache. Changing any field in `data` produces a new URL and a fresh render. **Before signing**, the template must have a `url_base` — generate one with `POST /api/v1/templates/{id}/url_base`.