Skip to main content

Templates

A template is a video built once in the TrueFan editor — avatar, scenes, layout, branding — and saved so it can be generated from repeatedly with different content each time. You never need to describe any of that in a request; you only ever reference a template by its template_id, and its full configuration is fetched live at generation time. This means editing a template in the dashboard changes what future API calls against it will produce — the API always renders the current version of a template, not a snapshot from whenever you first looked it up.
One exception: a Generate videos request is snapshotted at submission time, so it always renders consistently even if someone edits the template while it’s still processing.

Variables

You can create variables in the script section of the TrueFan editor — wherever a word or phrase should change per generation (a customer’s name, a score, a product), insert a variable instead of typing fixed text. Every template has its own, different set. Because the variable set is different per template, there’s no fixed request shape to look up in static docs — instead, call Get template schema to get the live, current list:

Supplying variable values

Pass a rows array in the body of Generate videos — one object per video, whether you’re generating one or many:
Each row’s keys should match the variable names from the schema endpoint. A row missing a key just leaves that one variable blank in that row’s video — it doesn’t fail the whole batch.

Cost

Every template carries its own estimated_credits — set when the template is saved — which is what one video from it costs. A request with multiple rows costs estimated_credits × row_count. You never send a cost in the request body; it’s always computed server-side from the template.