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.

POST/api/render/index

Request body

PropertyTypeRequiredDescription
pageIdstringYesPage ID to render
templateIdstringNoOptional; when set, validated against the page's template (parallel fetch)
draftbooleanNoIf true, load page and template from database instead of publish cache. Default: false
formatpng | svg | webpNoOutput format. Default: png
tweaksobjectNoVariable overrides by name
emojiTypestringNoe.g. twemoji, openmoji. Default from template
outputjson | binary | image | rawNoResponse shape: omit or json for application/json (default); binary, image, or raw for raw image bytes
binarybooleanNoIf true, same as output binary (raw image body)
renderTypesatori | takumi | htmlNoOverride rendering engine. If omitted, uses the template's rendererType (default satori).

Responses

200

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).

400

Invalid body (e.g. missing pageId)

401

Missing or invalid API token

404

Page or template not found

Request
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}'
Response
// Binary image (image/png, image/svg+xml, or image/webp)
// Or data URL for inline format