Data-driven video from a template
Declare {{variables}} once, save the document as a template, and render personalized videos per row of data.
Render the same video a thousand times with different data: product cards,
personalized outreach, daily stats, localized ads. Declare {{variables}} in
the document, save it as a template, then create renders from the template
with per-request values.
1. Declare variables
Any string value may contain {{name}} placeholders. Declare each variable in
movie.variables with a type (string, number, boolean, url, color,
enum) and an optional default:
Validation is strict in your favor: referencing an undeclared variable fails
with VARIABLE_UNDECLARED, a missing
value with no default fails with
VARIABLE_MISSING, and a value that can't be
losslessly coerced to the declared type fails with
VARIABLE_TYPE_MISMATCH — each at the
first reference site's exact JSON path.
2. Save it as a template
The response echoes the template with its variables manifest (derived from
body.variables — there is no separate manifest input to drift). Declared but
unused variables come back as non-fatal warnings.
3. Render it per data row
POST /v1/templates/{id}/renders with the values:
Defaults apply for anything you omit (accent above). Template renders go
through exactly the same pipeline as raw renders — same credit balance, same
idempotency, same webhooks — and answer with the same render resource.
Batch pattern
For a spreadsheet/DB batch, loop the rows client-side and use a
deterministic Idempotency-Key per row (e.g. order-{{id}}-v1). Crashed
and resumed jobs then never double-render: replays return the original render
with 200. Respect the X-RateLimit-Remaining header while looping, and
watch CONCURRENCY_LIMIT — queue locally
when you hit your plan's concurrent-render cap.
Wire it into n8n, Make or Zapier with the automation recipes.