Video Generation
Create high-quality videos from text prompts using state-of-the-art video generation models. This is an asynchronous endpoint that returns a job ID for status polling.Endpoint
Request Body
string
required
The model ID to use for video generation.Available models include:
veo-3.1(Google’s latest)sora-2(OpenAI’s latest)luma-ray-2(Luma AI’s latest)hailuo-2(MiniMax’s latest)pika-2.2(Pika Labs’ latest)kling-v1.5(Kuaishou’s latest)
string
required
A text description of the desired video. The maximum length is 1000 characters.
string
default:"16:9"
The aspect ratio of the generated video. Options:
16:9, 9:16, 1:1.integer
default:5
The duration of the generated video in seconds. Options:
5, 10.string
A unique identifier for the end-user, for abuse monitoring.
Response
string
Unique identifier for the generation job (e.g.,
vid-abc123)string
Current status of the job. Always
"pending" initially.string
The URL to poll for the job status.
Polling for Status
Since video generation is an asynchronous process, you must poll the status endpoint until the job is completed.Endpoint
Response
string
Unique identifier for the generation job
string
Current status of the job. One of:
"pending", "processing", "completed", "failed".object
The result of the generation job (only present when
status is "completed").video_url(string): The URL of the generated videothumbnail_url(string): The URL of the video thumbnail
object
Error details (only present when
status is "failed").message(string): Description of the error