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

# Video templates

> Generate MP4 clips with dynamic text and images

Video templates produce MP4 clips by animating layers across a timeline. Renders are generated by ffmpeg compositing Konva snapshots.

## Differences vs image templates

|              | Image             | Video                      |
| ------------ | ----------------- | -------------------------- |
| Output       | PNG/JPEG          | MP4 + thumbnail JPEG       |
| Render time  | Seconds           | Tens of seconds to minutes |
| Endpoint     | `POST /v1/images` | `POST /v1/videos`          |
| Extra fields | —                 | `duration_seconds`, `fps`  |

## Animation primitives

Each layer can declare a `keyframes` array:

```json theme={null}
{
  "name": "title",
  "type": "text",
  "keyframes": [
    { "t": 0,   "opacity": 0, "y": 540 },
    { "t": 0.5, "opacity": 1, "y": 500 },
    { "t": 4.5, "opacity": 1, "y": 500 },
    { "t": 5,   "opacity": 0, "y": 460 }
  ]
}
```

`t` is seconds. Imtegrate interpolates linearly between keyframes.

## Triggering a video render

```bash theme={null}
curl -X POST https://api.imtegrate.com/v1/videos \
  -H "Authorization: Bearer $IMTEGRATE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "tpl_promo",
    "modifications": [
      { "name": "headline", "text": "New collection drops Friday" }
    ]
  }'
```

Response includes `id`, `status: "pending"`. The completed render has both `result_url` (MP4) and `thumbnail_url` (JPEG poster frame).

## Limits

* Max duration: **60 seconds** (free plan)
* Max resolution: **1920×1080**
* Frame rate: 24, 30, or 60 fps
