Rendering
Render by page ID
Render a page by ID from the publish cache, or from the database when draft: true. Requires API token. Does not accept full inline page payloads. Optional body field renderType (satori, takumi, html) overrides the template's rendererType. Default response is application/json with timings, pageId, templateId, renderType, and a URL to the uploaded render; set request body output to binary (or binary: true) to return raw image bytes like GET.
Rendering
Render by page ID
Render a page by ID from the publish cache, or from the database when draft: true. Requires API token. Does not accept full inline page payloads. Optional body field renderType (satori, takumi, html) overrides the template's rendererType. Default response is application/json with timings, pageId, templateId, renderType, and a URL to the uploaded render; set request body output to binary (or binary: true) to return raw image bytes like GET.
/api/render/indexRequest body
| Property | Type | Required | Description |
|---|---|---|---|
| pageId | string | Yes | Page ID to render |
| templateId | string | No | Optional; when set, validated against the page's template (parallel fetch) |
| draft | boolean | No | If true, load page and template from database instead of publish cache. Default: false |
| format | png | svg | webp | No | Output format. Default: png |
| tweaks | object | No | Variable overrides by name |
| emojiType | string | No | e.g. twemoji, openmoji. Default from template |
| output | json | binary | image | raw | No | Response shape: omit or json for application/json (default); binary, image, or raw for raw image bytes |
| binary | boolean | No | If true, same as output binary (raw image body) |
| renderType | satori | takumi | html | No | Override rendering engine. If omitted, uses the template's rendererType (default satori). |
Responses
Default: application/json with render metadata and file.url to the uploaded image. With body output binary (or binary: true): raw image (image/png, image/svg+xml, or image/webp).
Invalid body (e.g. missing pageId)
Missing or invalid API token
Page or template not found
curl -X POST "https://bannx.com/api/render/index" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{"pageId":"string","templateId":"string","draft":false,"format":"png","tweaks":null}'// Binary image (image/png, image/svg+xml, or image/webp)
// Or data URL for inline format