Skip to main content
Use POST /v2/videos/generations to start a video generation. Video generation is asynchronous, so you submit once, poll for status, and download the finished asset when it’s ready.

The generation flow

1

Submit a generation request

POST to /v2/videos/generations with your model, prompt, and parameters. The API returns HTTP 202 with a generation ID and status: "pending".
2

Poll for completion

GET /v2/videos/generations/{id} periodically. The status will be pending, failed, or completed.
3

Download the video

When status is completed, download the video from the signed download URL in data[0].url.

Step 1: Submit

Step 2: Poll for status

Poll the status endpoint with your generation ID.
Completed response:

Polling strategy

Poll every 5 seconds as a starting point. Set a timeout so your integration stays responsive and does not poll forever.

Step 3: Download

The url in each data item is a signed download URL. Download the file before the deletes_at timestamp.

Parameters

Using frame and reference images

Video models support multiple image roles in the images array:
  • first_frame: the opening frame of the video
  • last_frame: the closing frame of the video. This always requires a first_frame.
  • reference_image: a style or content reference when you need the output to stay closer to an existing visual direction. You cannot combine it with first_frame or last_frame.
Not all models support all roles. Unsupported roles return 400 with code invalid_parameter.

Failure states

Video generations can fail after submission.
  • If polling returns status: "failed", treat that generation as terminal.
  • Read error.message for the reason.
  • Fix the input, wait if the problem is temporary, or submit a new generation.

Sound

Set sound: true to generate audio. Supported models are listed on the Models page.

Full example