> ## Documentation Index
> Fetch the complete documentation index at: https://tfstudio.truefan.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Generate personalized videos programmatically from your own templates

The TrueFan API lets you generate videos from templates you've built in the TrueFan editor — programmatically, from your own backend, at any scale from a single video to a batch of thousands.

You build a template once in the editor — avatar, script, branding, variables for anything that should change per video — then call the API to fill in those variables and get a rendered video back.

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/docs/quickstart">
    Generate your first video in under 5 minutes
  </Card>

  <Card title="Authentication" icon="key" href="/docs/authentication">
    Create an API key and make your first authenticated request
  </Card>

  <Card title="Generate videos" icon="layer-group" href="/docs/guides/bulk-generate-videos">
    Render one video, or hundreds, in a single call
  </Card>

  <Card title="Webhooks" icon="webhook" href="/docs/guides/webhooks">
    Get notified the moment a video finishes, instead of polling
  </Card>
</CardGroup>

## How it fits together

<Steps>
  <Step title="Build a template">
    In the TrueFan editor, build a video and save it as a template. Create variables in the script for anything that should change per video — a name, a score, a product — the API can fill these in per-request.
  </Step>

  <Step title="Look up what the template needs">
    Call [Get template schema](/docs/api-reference/templates/get-template-schema) to get the exact variable names and an example payload — every template has a different set of variables, so this is computed live from the template itself rather than documented statically.
  </Step>

  <Step title="Generate">
    Call [Generate videos](/docs/api-reference/generation/bulk-generate-videos) with a list of rows — one row for a single video, many for a batch.
  </Step>

  <Step title="Get the result">
    Poll the [status endpoints](/docs/api-reference/status/get-bulk-job-status), or configure a [webhook](/docs/guides/webhooks) to be notified when rendering completes.
  </Step>
</Steps>

## Base URL

```
https://dev-backend-ai.truefans.in/api/external/v1
```

<Note>
  API keys are created and managed from the [dashboard](https://app.truefan.ai/dashboard/api-keys) — see [Authentication](/docs/authentication) for how to use one.
</Note>

## Design principles

<AccordionGroup>
  <Accordion title="Everything is workspace-scoped">
    An API key belongs to one workspace. Every template you can list, and every generation you create, is scoped to that workspace — the same one your team already collaborates in on the TrueFan dashboard.
  </Accordion>

  <Accordion title="You reference a template, you don't rebuild it">
    You never need to describe a video's avatar, layout, or branding in the request — that's already saved in the template. You just reference it by `template_id` and supply `variables`, computed live at generation time.
  </Accordion>

  <Accordion title="Rows are inline JSON, not files">
    Generation takes `rows` — a JSON array of `{variable: value}` objects, one per video — directly in the request body. There's no CSV to format or file to host; if your data already lives in a database or spreadsheet, you serialize it straight into the request.
  </Accordion>
</AccordionGroup>
