Generate
Videos
POST /v1/videos/generations: a clip from a prompt, a first frame, or a first and a last frame.
/v1/videos/generationsHolds the clip's price, starts it and answers 202 with the generation to poll./v1/videos/generations/{id}The generation, moved forward if it is still running.Body
| Field | Type | Notes |
|---|---|---|
| model | string | Required. A video model id from GET /v1/models. |
| prompt | string | Required. Up to 2,400 characters: the action, the camera, the sound. |
| duration | integer | Seconds, on the model's grid (options.durations: min, max, step). 5 when left out, or the nearest the model allows. |
| resolution | string | One of the model's options.resolutions. Its default_resolution when left out. |
| aspect_ratio | string | 16:9, 9:16, 1:1, 21:9, 4:3 or 3:4, as the model lists. |
| audio | boolean | Default true. Honoured where the model has audio_toggle; some models always render sound. |
| reference_images | string[] | Up to 4 pictures, each an https URL, a data:image/png|jpeg|webp|gif;base64, URI, an upload (upl_…) or one of your image outputs (file_…): the first frame, or references (see reference_mode). |
| reference_mode | string | frame (default): on models with start_frame, one picture, the first frame. identity: up to max_reference_images pictures of who or what stars, and the model builds the scene; not with end_image. |
| end_image | string | The last frame, on models with end_frame, in the same forms. Needs a first frame. |
| seed | integer | 0 to 2147483647, on models with seed. |
| negative_prompt | string | Up to 1,000 characters, on models with negative_prompt. |
| private | boolean | Private mode, on models with options.private, at their private_resolutions: nothing is kept, not even the prompt, and the clip is served for about 30 minutes. See Private mode. |
| max_cost_usd | number | The most this request may cost, in USD: a higher price is refused with 400 max_cost_exceeded before anything is held. See Quotes. |
A value the model does not take is refused with 400 invalid_request before anything is held, and the message lists what it takes. Send an Idempotency-Key header to retry safely (Idempotency).
curl https://frameport.ai/v1/videos/generations \
-H "Authorization: Bearer $FRAMEPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2-5",
"prompt": "A red vintage car winds along a coastal road at sunrise, drone follow shot",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"audio": true
}'Price
A clip costs per_second[resolution] × duration, with per_second_with_audio instead where sound is priced apart. Some models list an aspect_ratio_multiplier, or a price per picture sent. The hold covers the most the clip can cost; the charge is the exact price, and a failed clip costs nothing.
First and last frame
Send one picture in reference_images to start the clip on it, and end_image to land on another. Describe the motion only: the frames already set the subject and the scene.
{
"model": "seedance-2-5",
"prompt": "The sketch fills with colour until it becomes the finished painting",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"audio": true,
"reference_images": [
"https://example.com/sketch.jpg"
],
"end_image": "https://example.com/painting.jpg"
}Reference pictures
With reference_mode: "identity", the pictures are not frames: they show the people, products or places to keep, and the prompt says what happens. Each picture is priced like a frame. A model lists how many it takes in options.max_reference_images, and, where it renders them at fewer resolutions than its own, which ones in options.identity_resolutions.
{
"model": "seedance-2-5",
"prompt": "The woman from the first picture walks a dog on the beach at dusk, the dog from the second picture",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"audio": true,
"reference_images": [
"https://example.com/her.jpg",
"https://example.com/dog.jpg"
],
"reference_mode": "identity"
}A failed clip
When a clip fails, status is failed, error says why, and cost_usd is 0: the hold went back to the balance.
{
"id": "gen_9sLq2VbX7mN4kR1tYc8WpE",
"object": "generation",
"type": "video",
"model": "seedance-2-5",
"status": "failed",
"input": {
"prompt": "A red vintage car winds along a coastal road at sunrise, drone follow shot",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"audio": true
},
"reserved_usd": 1.35,
"cost_usd": 0,
"outputs": [
{
"id": "file_2Tn7XcQ9vLm4Ra8Ws1KbZd",
"status": "failed",
"error": {
"code": "generation_failed",
"message": "The generation failed. Nothing was charged."
}
}
],
"error": {
"code": "generation_failed",
"message": "The generation failed. Nothing was charged."
},
"created_at": "2026-11-27T10:00:00.000Z",
"completed_at": "2026-11-27T10:01:12.000Z"
}