Render
POST /v1/templates/:id/render
POST
/v1/templates/:id/renderscope: render:writeRasterize a template's current draft to an image or PDF, optionally substituting variable values first. Costs one credit per rendered file — an identical re-render (e.g. a retried request with the same idempotencyKey) is free.
| Param | Type | Notes |
|---|---|---|
| format | "png" | "jpeg" | "pdf" | Defaults to "png". |
| modifications | Record<string,string> | Variable name → replacement value, applied before render. |
| pageId | string | Which page to render. Defaults to the active page. |
| allPages | boolean | Render every page. PDF → one multi-page file; png/jpeg → one file per page. Ignores pageId. |
| idempotencyKey | string | Reuse the same value on a retry to avoid a duplicate credit charge. |
curl -X POST https://app.frameline.io/v1/templates/tpl_123/render \
-H "Authorization: Bearer fl_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"format": "png",
"modifications": { "headline": "50% off today" }
}'Response
{
"id": "rnd_789",
"templateId": "tpl_123",
"format": "png",
"url": "https://.../rnd_789.png",
"byteSize": 482113,
"width": 1080,
"height": 1080,
"createdAt": "...",
"credits": { "charged": 1, "balanceAfter": 1879 }
}With allPages: true and format of png or jpeg, the response is { "pages": [ /* one of the above per page */ ] } instead of a single object.
On a repeat render with an unchanged draft, unchanged modifications and the same
idempotencyKey, the response is identical except credits.charged is 0.