Render a template (GET)

Render a template by ID from the URL alone: options and variables as query parameters, the file streamed back by default (`output=json` stores it and returns `{ url }`). Every query key that is not a render option is a template variable, e.g. `?title=Hello&count=3`; `variables` may also be a JSON object string, and `var.<name>` / `variables[<name>]` name a variable that collides with an option. Auth: `Authorization: Bearer` or `?api_token=` — a key in the URL must be scoped to the Template Render API only (a render-only key), so leaking the URL leaks nothing else.

GET/api/v1/templates/:id/render

Query / Path parameters

NameInRequiredDescription
idpathYesTemplate ID
api_tokenqueryNoA render-only API key (endpoint scope exactly template.render, no MCP tools). Alternative to the Authorization header.
formatqueryNopng (default), webp, svg, pdf, webm, mp4, gif, zip, html5
clickUrlqueryNoRequired for html5: absolute HTTP(S) destination URL
loopsqueryNoHTML5 repetitions: 1–10, default 1
networkqueryNoHTML5 network preset: generic (default), google-ads, dv360, cm360, amazon-dsp, adroll
outputqueryNo`json` to store the file and return { url, timings } instead of the bytes
scalequeryNoResolution multiplier 0.25–4
qualityqueryNostandard | high
scenequeryNoStill formats: scene index. Omit on a pdf of a still (non-animated) template to get every scene as a page.
framequeryNoStill formats: frame index within the scene
nodeIdqueryNoStill formats: render one layer
variationqueryNoSaved variation id, or several comma-separated (stacked in order; at most one per single-select group)
brandqueryNoRender with another brand of the key's space for this render only: a brandId, brand name or the brand's website URL. The template keeps its own brand. Another space's brand is BRAND_NOT_FOUND (404); a name matching several brands is BRAND_AMBIGUOUS (409).
brandVariantqueryNoBrand campaign variant id(s), comma-separated
draftqueryNo`true` renders the current document instead of the published version
sizequeryNoAnother output size: a preset id (og, story, leaderboard, …) or WIDTHxHEIGHT; the template is not changed
fitqueryNoreflow (default) | scale — how the design adapts to `size`
dpiqueryNoPDF only: print resolution 72–1200 (page = pixels × 72 / dpi points). Default: the template's exportDefaults.dpi, else 300 on a print-size template, else 72
variablesqueryNoJSON object of variables (optional — bare keys work too)

Responses

200

The rendered file (default; `x-credits-charged` / `x-credits-balance` headers carry what it cost, and on a template with verified documents on `x-credential-id` / `x-credential-url` name the document it issued), or JSON { ok, templateId, format, url, timings, creditsCharged, balanceAfter, brand?, credential? } with output=json — `credential` { id, url, code, reused } is the verified document this render issued

401

Missing or invalid API key

403

The key lacks the template.render scope, or a URL key is not render-only, or the space's verified documents are suspended (CREDENTIALS_SUSPENDED)

404

Template not found in the key's space, or `brand` names no brand of the key's space (BRAND_NOT_FOUND)

409

`brand` matches several brands of the space (BRAND_AMBIGUOUS)

Request
curl -X GET "https://bannx.com/api/v1/templates/:id/render" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
Response
// Binary image (image/png, image/svg+xml, or image/webp)
// Or data URL for inline format