Render a template (integrations)
Renders like `POST /api/v1/templates/{id}/render` and takes the same fields except `raw`, but `variables` may be form text: each value is converted to its variable's type (numbers, booleans, a list as JSON or comma-separated text, an object as JSON), undeclared names are dropped and empty values keep the template's default. Without `callbackUrl` the answer is the render route's JSON. With `callbackUrl` it answers 202 at once and POSTs that JSON to `callbackUrl` when the render finishes, or `{ ok: false, templateId, error: { code, message, status } }` when it fails: for clips that outlast an automation platform's step limit. `callbackUrl` must be a public HTTPS URL. A server restart mid-render loses an async render and no callback arrives. Bearer API key with the `template.render` scope; costs what the same render costs.
Render a template (integrations)
Renders like `POST /api/v1/templates/{id}/render` and takes the same fields except `raw`, but `variables` may be form text: each value is converted to its variable's type (numbers, booleans, a list as JSON or comma-separated text, an object as JSON), undeclared names are dropped and empty values keep the template's default. Without `callbackUrl` the answer is the render route's JSON. With `callbackUrl` it answers 202 at once and POSTs that JSON to `callbackUrl` when the render finishes, or `{ ok: false, templateId, error: { code, message, status } }` when it fails: for clips that outlast an automation platform's step limit. `callbackUrl` must be a public HTTPS URL. A server restart mid-render loses an async render and no callback arrives. Bearer API key with the `template.render` scope; costs what the same render costs.
/api/v1/integrations/templates/:id/renderQuery / Path parameters
| Name | In | Required | Description |
|---|---|---|---|
| id | path | Yes | Template ID |
Request body
| Property | Type | Required | Description |
|---|---|---|---|
| callbackUrl | string | No | Public HTTPS URL that receives the render result. Omit to render and answer in one request. |
| format | string | No | Output format, as on the render route. Default png. |
| variables | object | No | Variable values by name; text is converted to each variable's type. |
Responses
Without callbackUrl: the render route's JSON { ok, templateId, format, url, creditsCharged, balanceAfter, … }.
With callbackUrl: JSON { ok: true, status: "rendering", templateId } — the result arrives at callbackUrl.
callbackUrl is not a public HTTPS URL (VALIDATION).
Missing or invalid API key, or the key lacks the template.render scope (SCOPE_DENIED).
No template with that id in the key's space (TEMPLATE_NOT_FOUND).
curl -X POST "https://bannx.com/api/v1/integrations/templates/:id/render" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{"callbackUrl":"string","format":"string","variables":null}'// Binary image (image/png, image/svg+xml, or image/webp)
// Or data URL for inline format