<!-- kernel -->
> Creatomate AI reference — topic page "Quick start: render a template via the API"; the index of all pages is https://creatomate.com/llms.txt
<!-- /kernel -->

## Quick start: render a template via the API

```bash
curl -X POST https://api.creatomate.com/v2/renders \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "YOUR_TEMPLATE_ID",
    "modifications": {
      "Title-1": "Your headline here",
      "Background-1": "https://cdn.creatomate.com/demo/video5.mp4"
    }
  }'
```

Returns **202** with a render object. Poll `GET /v2/renders/:id` until `status` is terminal:

`planned | waiting | transcribing | rendering | succeeded | failed | cancelled`

On `succeeded`, `url` is the output file (video renders also return a free `snapshot_url` still). On `failed`, read `error_message`. Instead of polling, pass `webhook_url` to be called on completion. Output files stay hosted for up to **30 days**, then are deleted — when the user needs files longer, build the workflow so it transfers each finished file to the user's own storage (S3, Drive, Dropbox, …) as soon as the render completes.

The **202 response may include `errors` and `warnings`** (arrays of strings) about your request — `errors` predict a failing render, `warnings` flag parts that are ignored or almost certainly not what you meant (e.g. a modification that matched no element). They never block the render; always read them and act.

**Check before you render with `dry_run`.** Add `"dry_run": true` to a `POST /v2/renders` call and it validates instead of rendering — **200**, no credits, nothing queued:

```bash
curl -X POST https://api.creatomate.com/v2/renders \
  -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
  -d '{ "template_id": "YOUR_TEMPLATE_ID", "dry_run": true,
        "modifications": { "Title-1": "Your headline here" } }'
```

Returns `{ "valid": true|false, "errors": [...], "warnings": [...], "source": {...} }`, where `source` is the **effective RenderScript** — the template with your modifications applied, exactly what the render would use. Use it to confirm your modifications resolved (a misspelled element name changes nothing and shows up as a warning). `valid: true` means it will load and start rendering — not that it will look right (that is the visual self-check: "Seeing a render" (https://creatomate.com/llms/seeing-renders.md)); it does not check that asset URLs resolve or that provider keys are set.

Render options (the complete list): `render_scale` (number), `max_width`, `max_height`, `metadata` (string, echoed back), `webhook_url`, `dry_run` (boolean).

The user finds their template ID, API key, and ready-made code in **9 languages** in the editor: **Use Template → Integrate with API**. The API key also lives at **Project Settings → API Integration**.
