Skip to content

Generate

Videos

POST /v1/videos/generations: a clip from a prompt, a first frame, or a first and a last frame.

POST/v1/videos/generationsHolds the clip's price, starts it and answers 202 with the generation to poll.
GET/v1/videos/generations/{id}The generation, moved forward if it is still running.

Body

FieldTypeNotes
modelstringRequired. A video model id from GET /v1/models.
promptstringRequired. Up to 2,400 characters: the action, the camera, the sound.
durationintegerSeconds, on the model's grid (options.durations: min, max, step). 5 when left out, or the nearest the model allows.
resolutionstringOne of the model's options.resolutions. Its default_resolution when left out.
aspect_ratiostring16:9, 9:16, 1:1, 21:9, 4:3 or 3:4, as the model lists.
audiobooleanDefault true. Honoured where the model has audio_toggle; some models always render sound.
reference_imagesstring[]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_modestringframe (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_imagestringThe last frame, on models with end_frame, in the same forms. Needs a first frame.
seedinteger0 to 2147483647, on models with seed.
negative_promptstringUp to 1,000 characters, on models with negative_prompt.
privatebooleanPrivate 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_usdnumberThe 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.

200 OK, failed
{
  "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"
}