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

# Video Generation

> Produce video from a start frame, from text, or from text styled with your trained models.

`POST /videos/generations` produces a video in one of three modes, selected by the
`mode` field:

* **`image_to_video`** — animate a start frame, with an optional end frame on
  end-frame-capable engines.
* **`text_to_video`** — generate a clip from a prompt alone.
* **`text_to_video_styled`** — a prompt plus your organization's trained models.

Engine capabilities (supported modes, durations, resolutions, aspect ratios,
end-frame and audio support, and pricing) come from
[`GET /videos/models`](/api-reference/videos/list-engines) — read it first to pick a
valid `engine` + `duration` combination.

## Asynchronous pattern

`POST /videos/generations` returns **`202 Accepted`** with a job `id`; poll
[`GET /videos/generations/{id}`](/api-reference/videos/get-generation) until
`completed`, then read the produced video (presigned URL valid **24 hours**). A
`webhook_url` gives you a push callback — see [Webhooks](/guides/webhooks).

## Credits

Video credits scale with the engine's per-second rate, duration, resolution
multiplier, and audio multiplier — see `credits_per_second` and the multipliers in
[`GET /videos/models`](/api-reference/videos/list-engines). Costs draw from your
organization's pool; an exhausted pool returns `402`. See
[Pricing](/guides/pricing).
