Gemini Omni 1.2 Flash
google/gemini-omni-1.2-flash generates 3 to 15 second clips with audio. Later requests can edit the same clip in natural language, extend it, or upscale it to a higher resolution. Requests go to /v1/video/generations.
For a cheap workflow, draft at 360p or 720p, edit the clip you like and upscale last. Generating at a high resolution from the start costs more and takes longer.
Google fully supports English prompts. Prompts in other languages can work, but results may vary.
First request
Section titled “First request”curl "$LLMTR_BASE_URL/v1/video/generations" \ -H "Authorization: Bearer llmtr-your_key" \ -H "Content-Type: application/json" \ --max-time 620 \ -d '{ "model": "google/gemini-omni-1.2-flash", "prompt": "A paper airplane glides across a quiet library, soft daylight, single continuous shot.", "duration_seconds": 5, "resolution": "360p", "aspect_ratio": "16:9" }'The video comes back as a base64 MP4 in data[0].b64_json; url is null on this model.
{ "id": "ChAxMjM0NTY3ODkw", "object": "video.generation", "model": "google/gemini-omni-1.2-flash", "status": "completed", "store": false, "data": [ { "url": null, "b64_json": "AAAAIGZ0eXBpc29t...", "mime_type": "video/mp4", "duration": 5 } ], "usage": { "input_tokens": 100, "output_tokens": 10000, "reasoning_tokens": 500, "total_tokens": 10600, "duration": 5, "resolution": "360p" }}The numbers in this example only show the format.
Parameters
Section titled “Parameters”| Field | Description |
|---|---|
model |
google/gemini-omni-1.2-flash. |
prompt |
Text description of the video. Required except for upscaling. |
duration_seconds |
Whole number from 3 to 15. Required. At most 10 with both a first and a last frame. |
resolution |
360p, 720p, 1080p or 4k. Without it, 720p; when continuing an earlier video, that video's resolution. |
aspect_ratio |
16:9 or 9:16. Without it, the ratio is inferred from the prompt. When you send your own video the ratio comes from the video and this field is ignored. |
media |
A list of images or a video. Each item has type and url (see below). |
image_url |
A single first frame, the same as first_frame in media. |
store |
When true, the request and the video are stored by Google for 7 days and the video can be edited later. Default false. |
previous_id |
The id of the video to continue. Send it with store: true. |
task |
upscale only. |
max_wait_seconds |
The longest to wait for the video. On this model both the default and the ceiling are 600 seconds. |
max_budget_usd |
The most you allow for this request. If the estimate is higher, the request answers 400 budget_too_low without starting. |
negative_prompt is ignored and named in the answer's llmtr_dropped_parameters field. Say what to avoid in the prompt, for example "show no text".
Video generation can take minutes. If a request passes 15 seconds, the 200 status is sent right away and blank lines flow until the answer arrives; JSON parsers skip them, so there is nothing to configure. An error after that point comes in the body as an error field, so check for error in the answer as well.
Video from images
Section titled “Video from images”media[].url takes base64 data URLs only. Images must be PNG, JPEG or WebP; a remote address answers 400 unsupported_input.
type |
What it does | Limit |
|---|---|---|
first_frame |
Fixes the first frame | 1 |
last_frame |
Fixes the last frame, needs a first_frame |
1 |
reference_image |
Carries a person, product or style without fixing a frame | 6 |
video |
Edits or extends your own video, MP4 | 1 |
Frames and reference images cannot share a request. A video cannot be combined with other media.
{ "model": "google/gemini-omni-1.2-flash", "prompt": "A smooth transition from the first image to the second image.", "duration_seconds": 5, "resolution": "720p", "media": [ { "type": "first_frame", "url": "data:image/png;base64,iVBORw0KGgo..." }, { "type": "last_frame", "url": "data:image/png;base64,iVBORw0KGgo..." } ]}Google may refuse images of recognizable people.
Editing and extending
Section titled “Editing and extending”To edit a video later, send store: true when you generate it. Use the id from that answer on the next request, which needs store: true as well.
{ "model": "google/gemini-omni-1.2-flash", "previous_id": "ChAxMjM0NTY3ODkw", "store": true, "prompt": "Make the paper airplane bright red. Keep everything else the same.", "duration_seconds": 5}The prompt decides whether this is an edit or an extension. To extend, say so: Extend this video: the airplane lands on an open book.
- Editing: the output is as long as the source. Send the source's length as
duration_seconds. - Extending: adds 3 to 10 seconds per turn.
duration_secondsis the time to add. The answer returns the joined video,data[0].durationgives the total length, and only the added seconds are billed. mediacannot be sent withprevious_id.previous_idworks only on the account that generated the video. Another account's id, or an id older than 7 days, answers 404not_found.
When you send your own video in media as video, the prompt decides the same way and store is not needed.
Upscaling
Section titled “Upscaling”Upscale an earlier video with task: "upscale". This request takes no media, and prompt and aspect_ratio are ignored; resolution is required and duration_seconds must be the source video's length.
{ "model": "google/gemini-omni-1.2-flash", "previous_id": "ChAxMjM0NTY3ODkw", "store": true, "task": "upscale", "resolution": "1080p", "duration_seconds": 5}| Source | Target | Tokens/second | $/second |
|---|---|---|---|
| 360p | 720p | 2,896 | 0.034752 |
| 360p | 1080p | 5,792 | 0.069504 |
| 720p | 1080p | 2,896 | 0.034752 |
| 720p | 4k | 11,584 | 0.139008 |
There is no direct upscale from 360p to 4K or from 1080p to 4K. Videos longer than 15 seconds cannot be upscaled. Upscaling bills no input tokens and no thinking.
Pricing
Section titled “Pricing”No platform margin is added to the model price. The bill comes from the token counts in the answer.
| Item | Price ($/1M tokens) |
|---|---|
| Input (text, image, video) | 1.50 |
| Text output and thinking | 9.00 |
| Video output | 12.00 |
Video output tokens follow from resolution and length:
| Resolution | Tokens/second | $/second | 10 seconds | 15 seconds |
|---|---|---|---|---|
| 360p | 1,931 | 0.023172 | 0.23172 | 0.34758 |
| 720p | 5,792 | 0.069504 | 0.69504 | 1.04256 |
| 1080p | 8,688 | 0.104256 | 1.04256 | 1.56384 |
| 4k | 17,376 | 0.208512 | 2.08512 | 3.12768 |
Input and thinking tokens are added to these. The model thinks before it renders and no parameter turns that off; the real figure is in usage.reasoning_tokens.
- Each image counts for at most 1,120 input tokens.
- On edits and extensions the earlier video is input too: at most 5,792 tokens per second.
There is no cache discount or batch price.
Before the request starts, the most it can cost is set aside from your balance; once the video is delivered the actual tokens are billed and the rest is released. If generation fails or the wait runs out, the whole amount is released.
Errors
Section titled “Errors”| Status | Type | When |
|---|---|---|
| 400 | unsupported_input |
A duration, resolution, ratio, media type or combination of fields is not valid on this model. The message says which. |
| 400 | content_filter |
Google's content policy blocked the request. Change the prompt or the media. |
| 400 | invalid_request |
The model could not process the request. Check the duration, the resolution and the media. |
| 400 | budget_too_low |
The estimate is above max_budget_usd. |
| 404 | not_found |
The previous_id is not on this account or has expired. |
| 503 | model_unavailable |
The model is unavailable right now. Try again later. |
| 504 | provider_timeout |
The video did not finish within max_wait_seconds. You are not charged. |
Failed requests are not charged to your account.
Limits
Section titled “Limits”- Tool calling, structured output, system instructions and
temperatureare not supported. The model cannot be called on/v1/chat/completions. - Audio is output only; you cannot send audio input or an audio reference.
- Generated videos carry an invisible SynthID watermark.
Requests are sent to Google. With store: true, the request and the video are stored by Google for 7 days; without it, storage is turned off. LLMTR does not keep the prompt or the video.
For the general video guide, see Video Generation.