Skip to Content
DocumentationModelsVideoGemini Omni 1.2 Flash

Gemini Omni 1.2 Flash

Use gemini-omni-1.2-flash to create video output. This page contains the complete request needed for this model.

Model facts

PropertyValue
Model IDgemini-omni-1.2-flash
EndpointPOST /api/v1/generation/create
OutputVideo
Modestext-to-video, image-to-video, video reference
PricingView current pricing 

Minimal request

curl -X POST https://api.api-stock.com/api/v1/generation/create \ -H "Authorization: Bearer $API_STOCK_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gemini-omni-1.2-flash", "input": { "prompt": "A cinematic scene with soft natural light" } }'

The create response contains a task ID:

{ "code": 200, "data": { "taskId": "019ca881-9503-7270-a560-f00fc2b15785", "status": "not_started", "createdAt": "2026-08-22T12:00:00.000Z" } }

Parameters

Parameters belong inside the top-level input object. Unknown fields are rejected.

ParameterTypeRequiredDefaultDescription
promptstringYes—Describe the scene, motion, sound, or video edits. max 4000 chars
imageUrlsstring[]No—First frame and optional last frame. Two frames limit duration to 10 seconds. Cannot be combined with referenceImageUrls or videoUrls.
referenceImageUrlsstring[]No—Up to 10 subject reference images; prefer at most 6 for character consistency. Cannot be combined with imageUrls.
videoUrlsstring[]No—One source video, at most 15 seconds, to edit or extend. Editing preserves its length; duration is ignored. Source duration is checked before billing.
videoMode“edit” | “extend”No—Source-video operation. Extension adds 3–10 seconds and bills only the added segment. Requires videoUrls.
durationintegerNo10Whole output seconds (3–15), or added seconds for extension (3–10). Ignored when editing a source video. min 3, max 15
resolution“360p” | “720p” | “1080p” | “4k”No"720p"Output resolution; 1080p and 4K are upsampled.
aspectRatio“16:9” | “9:16”No"16:9"Output aspect ratio

Modes

Minimal generation

{ "model": "gemini-omni-1.2-flash", "input": { "prompt": "A cinematic scene with soft natural light" } }

15-second video

{ "model": "gemini-omni-1.2-flash", "input": { "prompt": "A cinematic scene with soft natural light", "duration": 15, "resolution": "720p" } }

First and last frames

{ "model": "gemini-omni-1.2-flash", "input": { "prompt": "A cinematic scene with soft natural light", "imageUrls": [ "https://example.com/start.jpg", "https://example.com/end.jpg" ], "duration": 8 } }

Edit a source video

{ "model": "gemini-omni-1.2-flash", "input": { "prompt": "A cinematic scene with soft natural light", "videoUrls": [ "https://example.com/source.mp4" ], "videoMode": "edit" } }

Extend a source video

{ "model": "gemini-omni-1.2-flash", "input": { "prompt": "A cinematic scene with soft natural light", "videoUrls": [ "https://example.com/source.mp4" ], "videoMode": "extend", "duration": 4 } }

With image urls

{ "model": "gemini-omni-1.2-flash", "input": { "prompt": "A cinematic scene with soft natural light", "imageUrls": [ "https://example.com/input.jpg" ] } }

With reference image urls

{ "model": "gemini-omni-1.2-flash", "input": { "prompt": "A cinematic scene with soft natural light", "referenceImageUrls": [ "https://example.com/input.jpg" ] } }

With video urls

{ "model": "gemini-omni-1.2-flash", "input": { "prompt": "A cinematic scene with soft natural light", "videoUrls": [ "https://example.com/input.mp4" ] } }

Constraints

  • prompt: maximum 4000 characters.
  • videoMode: allowed: edit, extend.
  • duration: minimum 3; maximum 15.
  • resolution: allowed: 360p, 720p, 1080p, 4k.
  • aspectRatio: allowed: 16:9, 9:16.
  • Text, a single first frame and subject references support 3–15 whole seconds (default 10). First/last-frame interpolation and extension support only 3–10 seconds.
  • imageUrls holds the first and optional last frame; it cannot be combined with referenceImageUrls or videoUrls. Up to 10 subject reference images or one source video of at most 15 seconds are accepted.
  • With videoUrls, editing is the default: duration is ignored, the source length is probed before billing and rounded up to whole seconds. Extension requires videoMode extend and bills only the added seconds; the returned video also includes the original source.
  • Audio is generated from the prompt. 1080p and 4K are upsampled. Previous provider task IDs and conversational reuse are not accepted; supply a public source-video URL.

Invalid types, unsupported enum values, out-of-range numbers, and missing required fields return HTTP 400 with error.code: "invalid_input". Correct the request rather than retrying it unchanged.

Result

Poll the task or provide a top-level webhook URL in the create request:

curl https://api.api-stock.com/api/v1/task/status/$TASK_ID \ -H "Authorization: Bearer $API_STOCK_KEY"

A successful media task returns one or more files:

{ "code": 200, "data": { "taskId": "019ca881-9503-7270-a560-f00fc2b15785", "status": "finished", "files": [ { "fileUrl": "https://s3.api-stock.com/result.mp4", "fileType": "video" } ], "createdTime": "2026-08-22T12:00:00.000Z" } }

See Tasks and webhooks for terminal statuses, retries and webhook delivery.

Gemini Omni 1.2 Flash — API Stock