Skip to main content
POST
curl

Authorizations

Authorization
string
header
required

An account API key. Send it as Authorization: Bearer <key>.

Body

application/json

Start one video generation job.

model
string
required

The video model, named by its id or alias.

prompt
string
required

What to generate, in words. One to 8192 characters, and moderation screens it first.

duration
integer<int64> | null

Clip length in seconds; one of the model's supported_durations. Absent takes the model's default.

resolution
string | null

One of the model's supported_resolutions, such as 720p. Absent takes the model's default.

aspect_ratio
string | null

One of the model's supported_aspect_ratios, such as 16:9. Absent takes the model's default.

frame_images
object[] | null

Images that become the first or the last frame, one per frame type.

generate_audio
boolean | null

Ask for a soundtrack. Only a model with generate_audio accepts true, and the audio price applies.

seed
integer<int64> | null

A seed for repeatable output, where the model supports one.

Response

The job, accepted and queued. Poll polling_url until status is completed or failed.

A video job as the gateway reports it.

id
string
required

The job id; the polling and content URLs carry it.

object
string
required

Always video.generation.

Example:

"video.generation"

model
string
required

The model the job was submitted for, as the caller named it.

status
string
required

pending, in_progress, completed or failed.

polling_url
string
required

Where to poll this job.

created_at
integer<int64>
required

Unix seconds when the job was accepted.

duration
integer<int64>
required

The requested clip length in seconds.

resolution
string
required

The requested resolution.

aspect_ratio
string
required

The requested aspect ratio.

completed_at
integer<int64> | null

Unix seconds when the job reached completed or failed.

urls
string[] | null

Links to the finished file; present once the job is completed.

usage
object | null

What the job was charged; present once the job is completed.

error
object | null

Why the job failed; present only when it is failed. A failed job is not charged.