Model Rover

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/json

Omni 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"
}
FieldTypeDescription
modelstringComplete public Omni video model ID.
inputstring, object, or arrayText and the single allowed image or video input.
response_formatobject or arrayA video format with optional resolution, aspect_ratio, and duration.
generation_config.video_config.taskstringtext_to_video, image_to_video, or edit; inferred when omitted.
callback_urlstringOptional 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. Terminal media returned by Gemini is transferred to platform storage before the public task snapshot is finalized.

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
  }
}'
FieldTypeRequiredDescription
instancesarrayYesExactly one item.
instances[0].promptstringModel-dependentGeneration instruction.
instances[0].imageobjectNoSingle starting image for image-to-video.
parameters.durationSecondsinteger or integer stringNoDefaults to 8.
parameters.resolutionstringNoDefaults to 720p.
parameters.aspectRatiostringNoDefaults to 16:9.
parameters.numberOfVideosintegerNoIf present, must be 1.
callback_urlstringNoOptional 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[].video, lastFrame, and referenceImages are 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.

Inline video bytes and protected Gemini media URIs are downloaded by the Worker, validated as MP4, stored through the platform storage driver, and replaced with a platform URL before success is returned. Copy the final asset before the documented task retention period ends.

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