Gemini Video
Create Gemini Omni and Veo video tasks and retrieve platform-hosted results.
Gemini video models use two native creation shapes. Both return a platform task ID and use GET /v1/tasks/{taskId} for lookup.
Gemini Omni Interactions
POST /v1beta/interactions
x-goog-api-key: $API_KEY
Content-Type: application/jsonOmni supports text-to-video, exactly one image for image-to-video, or exactly one video for editing. It does not support streaming video creation, extension, or reference-to-video through the public gateway.
{
"model": "google/gemini-omni-1.1-flash",
"input": [
{ "type": "image", "data": "<BASE64_IMAGE>", "mime_type": "image/png" },
{ "type": "text", "text": "Animate the clouds" }
],
"response_format": {
"type": "video",
"resolution": "1080p",
"aspect_ratio": "16:9",
"duration": "8s"
},
"generation_config": {
"video_config": { "task": "image_to_video" }
},
"callback_url": "https://example.com/hooks/video?token=unguessable"
}| Field | Type | Description |
|---|---|---|
model | string | Complete public Omni video model ID. |
input | string, object, or array | Text and the single allowed image or video input. |
response_format | object or array | A video format with optional resolution, aspect_ratio, and duration. |
generation_config.video_config.task | string | text_to_video, image_to_video, or edit; inferred when omitted. |
callback_url | string | Optional public terminal callback URL. |
Defaults are 720p, 16:9, and 10 seconds. Gemini Omni 1.1 accepts 360p, 720p, 1080p, or 4k, an aspect ratio of 16:9 or 9:16, and a duration from "3s" to "10s"; the selected model's capability profile remains authoritative. stream: true, continuation fields, agent fields, and webhook configuration are rejected for video tasks.
The upstream Omni API also documents interpolation, subject references, reference_to_video, and extend. This gateway intentionally does not expose those modes yet; sending them returns an error rather than silently falling back.
The create response is an Interactions object whose id is the platform task ID. Video results are temporarily retained for 48 hours and automatically deleted upon expiration—download and transfer them immediately after completion.
Veo Predict Long Running
POST /v1/models/{model}:predictLongRunning
POST /v1beta/models/{model}:predictLongRunning
x-goog-api-key: $API_KEY
Content-Type: application/json{model} is the complete public Veo model ID. The body must contain exactly one instances item.
curl "http://127.0.0.1:11113/v1beta/models/google/veo-3.1-generate-preview:predictLongRunning" -H "x-goog-api-key: $API_KEY" -H "Content-Type: application/json" -d '{
"instances": [
{"prompt": "A cinematic lion walking through mist"}
],
"parameters": {
"durationSeconds": 8,
"resolution": "1080p",
"aspectRatio": "16:9",
"numberOfVideos": 1
}
}'| Field | Type | Required | Description |
|---|---|---|---|
instances | array | Yes | Exactly one item. |
instances[0].prompt | string | Model-dependent | Generation instruction. |
instances[0].image | object | No | Starting image for image-to-video or first-last-frame interpolation. |
instances[0].lastFrame | object | No | Ending frame for first-last-frame interpolation (requires image). |
parameters.durationSeconds | integer or integer string | No | Defaults to 8. |
parameters.resolution | string | No | Defaults to 720p. |
parameters.aspectRatio | string | No | Defaults to 16:9. |
parameters.numberOfVideos | integer | No | If present, must be 1. |
callback_url | string | No | Optional public terminal callback URL. |
The create response contains a rewritten name:
{
"name": "9dcf8ab2-c4b7-42be-a516-597223897b99"
}Veo 3.1 constraints
- Duration must be 4, 6, or 8 seconds.
- 1080p requires 8 seconds.
- Standard and Fast models support 720p, 1080p, and 4k; 4k requires 8 seconds.
- Lite models support 720p and 1080p and reject 4k.
- Every request produces exactly one video.
instances[].videoandreferenceImagesare not exposed.
Other provider business rules remain upstream-validated. Client routing and paid service-tier controls are rejected.
Results
Veo task snapshots retain the native long-running operation shape: done: false while running, or done: true with a response or error at terminal state. The public name remains the platform task ID.
Video results are temporarily retained for 48 hours and automatically deleted upon expiration—download and transfer the final asset to your own storage immediately after completion.
See Tasks and callbacks for querying and delivery behavior, and Gemini Interactions for the text path on the shared Interactions endpoint.
Help us improve this page
Found something unclear, outdated, or incorrect?
Last updated on