---
title: Render a template (integrations) – API | Bannx
description: "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."
source: https://bannx.com/docs/api/v1-integrations/integrations-render-with-callback
---

Copy page

POST`/api/v1/integrations/templates/:id/render`

#### Query / 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

200

Without callbackUrl: the render route's JSON { ok, templateId, format, url, creditsCharged, balanceAfter, … }.

202

With callbackUrl: JSON { ok: true, status: "rendering", templateId } — the result arrives at callbackUrl.

400

callbackUrl is not a public HTTPS URL (VALIDATION).

401

Missing or invalid API key, or the key lacks the template.render scope (SCOPE_DENIED).

404

No template with that id in the key's space (TEMPLATE_NOT_FOUND).

Request

```
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}'
```

Response

```
// Binary image (image/png, image/svg+xml, or image/webp)
// Or data URL for inline format
```