Gemini Omni 1.2 Flash
A Google video model: clips with sound of 3–15 seconds in 360p, 720p, 1080p and 4K from text, first and last frames and references. It edits, extends and upscales your video.
Specifications
Capabilities
Description
What it does
- Text to video (task_type
text_to_video): describe the scene, the camera movement and the sound. Length 3–15 s (default 10), resolution 360p, 720p (default), 1080p or 4k, aspect ratio 16:9 (default) or 9:16. - Image to video (
image_to_video): a first frame (first_frame) and, if needed, a last one (last_frame). With a last frame, up to 10 s. - Video from references (
reference_to_video): images (reference_image) and videos (reference_video) set the character, object, style and motion. Up to 10 images and 3 videos. - Video edit (
edit): your 3–15 s video (video) and text saying what to change; up to 2 hint images can be attached. The result has the length of the video. - Extension (
extend): a video of any length and how many seconds to add (3–10). The clip is the last 30 s of the source at most plus the continuation; up to 2 images can be attached. - Upscaling (
upscale): a video up to 15 s, 360p to 720p or 1080p, 720p to 1080p or 4k. No text is needed. seedis a whole number: the same seed and request give almost the same clip (except upscaling).- The model always creates sound: speech, music, effects. 24 fps, MP4.
- Without
task_type(auto) the mode follows the files: no files — text to video, frames — image to video, references — from references. Edit, extension and upscaling needtask_type.
File requirements
- Images: PNG, JPEG, WebP, HEIC, HEIF, up to 20 MB. Up to 10 images per request.
- Videos: MP4 or MOV (also WebM, MPEG, 3GP, FLV, WMV). Up to 3 videos per request.
- A file goes as an https link or a data URI in media: [{"type": "first_frame" | "last_frame" | "reference_image" | "reference_video" | "video", "url": "…"}]. A finished clip of this model can be passed back right away with the link from the response — to edit, extend or upscale it.
How to call
POST /v1/videos/generations (or /v1/videos/animations, /v1/videos/references, /v1/videos/edits) with a JSON body:
{"model": "google/gemini-omni-1.2-flash-02948", "prompt": "A red paper boat floats on a calm lake at sunrise, soft birdsong", "duration": 5, "resolution": "720p", "aspect_ratio": "16:9"}Extending a finished clip by 4 s:
{"model": "google/gemini-omni-1.2-flash-02948", "task_type": "extend", "prompt": "The camera rises and reveals mountains", "duration": 4, "media": [{"type": "video", "url": "https://…/video.mp4"}]}Upscaling 360p to 1080p:
{"model": "google/gemini-omni-1.2-flash-02948", "task_type": "upscale", "resolution": "1080p", "media": [{"type": "video", "url": "https://…/video.mp4"}]}Response
The response arrives when the video is ready: usually in 20–60 seconds, around two minutes or more for 4k. Set a client timeout of at least 16 minutes. data[0].url is a link to the MP4 file (it lives one day, save the file right away), duration_seconds is the clip length.
Errors
- 400: invalid request; the error text names the field. Code input_moderation: the request did not pass the content check (for example, recognizable real people). Rejected requests are not billed.
- 402: not enough funds on the balance. 429: the model is overloaded. 502 or 504: the video was not received.
Price
You pay per token: the clip (per second by resolution: 360p 1931, 720p 5792, 1080p 8688, 4k 17376 tokens), the input (an image is 1120 tokens, input video, text) and the model's reasoning. Upscaling is billed by the resolution pair; an extension bills only the new seconds. The prices are shown on this page.
Parameters
Endpoints
Code examples
Other Google models
/v1 in base_url. For Anthropic SDK — without /v1.