Submit a video generation request
Changed onSubmits a video generation request and returns a polling URL to check status
Request
- Base URLhttps://openrouter.ai/api/v1
- AuthHTTP bearer
Request body
Aspect ratio of the generated video. Omit it to use the model default, which on models with adaptive aspect ratio (e.g. BytePlus Seedance) follows the input image or video.
URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS.
Creativity level for video upscaling models only. This parameter is not supported by video generation models.
Duration of the generated video in seconds, or -1 to let the provider choose the length (e.g. following an input video). -1 is only accepted by models that list it in supported_durations.
Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame, and each frame_type may appear at most once. Combining frame_images with input_references is provider-specific: some models reject the combination (as a 400 on submit or as a failed job), some use the frame images alone, and some use both (e.g. Runway applies image references as style/guidance alongside the frame anchors).
Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. When neither is set, some providers (such as xAI) apply their own default and generate audio, so send false to request a silent video. Some models always include audio and ignore false. POST /videos returns 400 for true if every otherwise eligible endpoint explicitly disables audio generation.
Reference assets to guide video generation. Accepts image, audio, and video references. POST /videos rejects the request with a 400 when the model or its provider integration does not support a supplied reference modality. Combining input_references with frame_images is provider-specific: some models reject the combination (as a 400 on submit or as a failed job), some use the frame images alone, and some use both (e.g. Runway applies image references as style/guidance alongside the frame anchors).
ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field.
Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models.
Provider routing preferences (order, only, ignore), request-level data policy (zdr, data_collection) and provider-specific passthrough configuration. Sorting by price, latency, or throughput and automatic provider fallbacks are not supported. No video endpoint currently offers Zero Data Retention, so zdr: true fails routing.
Resolution of the generated video
If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. POST /videos returns 400 if every otherwise eligible endpoint explicitly declares seed unsupported.
A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio.
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
Upscale factor for video upscaling models only. This parameter is not supported by video generation models.
A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider.
Example request
{
"aspect_ratio": "16:9",
"duration": 8,
"model": "google/veo-3.1",
"prompt": "A serene mountain landscape at sunset",
"resolution": "720p"
}Response
Video generation request accepted
Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists.
The generation ID associated with this video generation job. Available once the job has been processed.
The video job ID, in the gen-vid-<timestamp>-<20 alphanumerics> generation ID format. Pass it as previous_job_id to continue the generation.
Absolute URL on the job’s OpenRouter regional host. Use it as returned to poll the job with your API key.
Percent complete, from 0 to 100 and possibly fractional, reported by the provider while status_detail is generating. Present only for providers that report it, and absent once the job moves to finalizing.
The step within status for a job that is not finished: submitting and queued_at_provider under pending, generating and finalizing under in_progress. When present, it only moves forward, and steps may be skipped between polls. It is absent once the job is finished and can also be absent mid-job when the step is unknown, so use status to tell whether the job is finished.
Absolute URLs on the job’s OpenRouter regional host, one per output. Use the selected URL as returned with your API key in the Authorization header. It works while the output is available.
Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until expires_at. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists.
Usage and cost information for the video generation. Available once the job has completed.
Example response
{
"generation_id": "gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt",
"id": "gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt",
"polling_url": "https://eu.openrouter.ai/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt",
"status": "pending",
"status_detail": "queued_at_provider"
}Changes
- info
added the new optional request property
provider/options/allOf[#/components/schemas/ProviderOptions]/celeris - info
added the new
Celerisenum value to the request propertyprovider/ignore/items/anyOf[#/components/schemas/ProviderName] - info
added the new
Celerisenum value to the request propertyprovider/only/items/anyOf[#/components/schemas/ProviderName]
1 more change in this revision
- info