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.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
Theurl 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 theimages array:
first_frame: the opening frame of the videolast_frame: the closing frame of the video. This always requires afirst_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 withfirst_frameorlast_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.messagefor the reason. - Fix the input, wait if the problem is temporary, or submit a new generation.
Sound
Setsound: true to generate audio. Supported models are listed on the Models page.