Gemini API

Gemini Omni Flash: Developer Guide (API + Code)

Gemini Omni Flash is Google's natively multimodal video model. It generates and edits 720p clips with audio through the Interactions API. This guide is code-first: task types, the conversational edit chain, real pricing math, the Nano Banana 2 Lite pipeline, and the gotchas that quietly break things.

Editorial hero illustration for Gemini Omni Flash: Developer Guide (API + Code)

What Launched

On June 30, 2026, Google shipped two generative-media models to developers in one announcement: Nano Banana 2 Lite (image, generally available) and Gemini Omni Flash (video, public preview). Both live in Google AI Studio, the Gemini API, and the Gemini Enterprise Agent Platform. Omni Flash also powers video in the consumer Gemini app and Google Flow. Omni Flash was first unveiled at Google I/O in May 2026 as a consumer feature; June 30 is the developer-API moment.

The changelog is blunt about what dropped: Released gemini-omni-flash-preview, a high-performance multimodal model for high-speed video generation and conversational video editing. The same entry pushed gemini-3.1-flash-lite-image (Nano Banana 2 Lite) to GA and announced that the Interactions API is now generally available. If you are sizing up the wider Gemini lineup first, our Gemini 3.5 Flash developer guide covers the text and reasoning side of the family.

One naming nuance to keep straight: the changelog and Logan's tweet call the Interactions API “GA,” but the spec mirror still carries a “Beta, breaking changes may occur” banner. Read it as: the core Interactions API is GA, while Omni Flash itself is public preview and its schemas can still change.

Specs at a Glance

Omni Flash is a natively multimodal model: it ingests any mix of text, image, and video and returns video with audio in a conversational interface. Three pillars Google repeats are native multimodality, conversational editing, and world knowledge (real physics plus Gemini facts). Here are the hard numbers from the official model page.

SpecValue
Model IDgemini-omni-flash-preview
StatusPublic preview
OutputMP4 video with audio
Duration3s to 10s (longer coming soon)
Resolution720p
Frame rate24 FPS
Aspect ratios16:9 (default), 9:16
Context window1,048,576 tokens
Task typestext_to_video, image_to_video, reference_to_video, edit
WatermarkSynthID on every output (invisible, detectable)
LanguageEnglish fully supported; others not evaluated

The number to internalize is 720p. The official model page lists it as the only resolution, so any “720p to 4K” claim you see elsewhere is wrong. Output is capped at 10 seconds today, with longer durations promised.

The Interactions API

Omni Flash has no standalone endpoint. Everything runs through the Interactions API: POST /v1beta/interactions, or client.interactions.create(...) in the SDK. The API is stateful, which is what makes conversational editing possible. Pass previous_interaction_id to continue a session and the server replays history for you, so you never re-upload the video.

from google import genai
client = genai.Client()

# every Omni Flash call is an "interaction"
first = client.interactions.create(
    model="gemini-omni-flash-preview",
    input="A paper boat sailing down a rain gutter."
)

# continue the SAME server-side session; no re-upload
followup = client.interactions.create(
    model="gemini-omni-flash-preview",
    previous_interaction_id=first.id,
    input="Make it night. Keep everything else the same."
)

Two flags govern behavior. store defaults to true; stored interactions are what make follow-up edits possible. Paid tier retains stored interactions for 55 days, free tier for 1 day. Setting store=false gives a stateless one-shot, but it disables previous_interaction_id editing and is incompatible with background=true. Note that previous_interaction_id carries only conversation history: tools, system_instruction, and generation_config are not inherited, so re-specify them each turn.

Mind your SDK versions. Interactions need google-genai (Python) 1.55.0 or newer and @google/genai (JS) 1.33.0 or newer. If client.interactions is missing, upgrade. The Omni Flash agent skill raises that floor to google-genai 2.10.0.

Task Types and Code

There are four task types: text_to_video, image_to_video, reference_to_video, and edit. Set the type explicitly in generation_config.video_config so the model stops guessing.

Text to video

The minimal call is a model ID plus a prompt string. Python, JavaScript, and curl:

# Python
import base64
from google import genai
client = genai.Client()

interaction = client.interactions.create(
    model="gemini-omni-flash-preview",
    input="A marble rolling fast on a chain reaction style track, continuous smooth shot."
)
with open("marble.mp4", "wb") as f:
    f.write(base64.b64decode(interaction.output_video.data))
// JavaScript
import { GoogleGenAI } from '@google/genai';
import * as fs from 'fs';
const ai = new GoogleGenAI({});

const interaction = await ai.interactions.create({
  model: 'gemini-omni-flash-preview',
  input: 'A marble rolling fast on a chain reaction style track, continuous smooth shot.',
});
if (interaction.output_video?.data) {
  fs.writeFileSync('marble.mp4', Buffer.from(interaction.output_video.data, 'base64'));
}
# curl
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gemini-omni-flash-preview","input":"A marble rolling fast on a chain reaction style track, continuous smooth shot."}'

Aspect ratio lives in response_format (16:9 default or 9:16). interaction.output_video is an SDK-only convenience field; over raw REST you dig into steps[].content where type is model_output. For clips over roughly 4 MB, request delivery: "uri", poll the Files API to ACTIVE, then download instead of decoding inline base64.

Image to video

Supply an image part plus a text instruction. Add more {"type":"image"} parts for subject reference (for example a cat plus a ball of yarn). Set the task so the intent is unambiguous:

interaction = client.interactions.create(
    model="gemini-omni-flash-preview",
    input=[
        {"type": "image", "data": base64_image, "mime_type": "image/jpeg"},
        {"type": "text", "text": "turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video"}
    ],
    generation_config={"video_config": {"task": "image_to_video"}},
)

JavaScript uses camelCase: generationConfig: { videoConfig: { task: 'image_to_video' } }.

Reference to video (image-role tags)

Omni's consistency trick is inline tags in the prompt. <FIRST_FRAME> uses an image as the starting frame. <IMAGE_REF_N> (zero-indexed) uses an image as a style or subject reference. You can lay out a full timeline across multiple reference images:

# Starting frame
"<FIRST_FRAME> a woman is walking"

# Style + subject references (0-indexed)
"in the style of <IMAGE_REF_0> a woman <IMAGE_REF_1> is walking"

# Multi-reference timeline (6 images)
[0-3s] A studio fashion sequence. Starting with woman <IMAGE_REF_0>, she is holding <IMAGE_REF_1>
[3-6s] Then we see the man <IMAGE_REF_2> holding <IMAGE_REF_3>
[6-10s] And finally another woman <IMAGE_REF_4> who is holding <IMAGE_REF_5> while walking.

The Edit Chain

This is the headline feature. Generate once, then edit in plain language. Each turn produces a new video, and the model preserves what you did not mention. Chain the turns with previous_interaction_id so there is no re-upload. The blog documents up to three sequential edits per session.

import base64
from google import genai
client = genai.Client()

res1 = client.interactions.create(
    model="gemini-omni-flash-preview",
    input="A woman playing violin outdoors."
)
res2 = client.interactions.create(
    model="gemini-omni-flash-preview",
    previous_interaction_id=res1.id,
    input="Make the violin invisible."
)
res3 = client.interactions.create(
    model="gemini-omni-flash-preview",
    previous_interaction_id=res2.id,
    input="Change the camera angle to be over the shoulder. Keep everything else the same."
)
res4 = client.interactions.create(
    model="gemini-omni-flash-preview",
    previous_interaction_id=res3.id,
    input="Make it look like Japanese anime. Keep everything else the same."
)
with open("final.mp4", "wb") as f:
    f.write(base64.b64decode(res4.output_video.data))

The doc's editing best practice is simple: keep edit prompts short and append “Keep everything else the same.” You can also edit your own uploaded video by first pushing it through the Files API and passing it as a document part, though that path has a regional catch covered below.

Pricing and the $9.34 Reel

Pricing is per 1M tokens unless noted. The practical rate that matters is Omni Flash's ≈ $0.10 per second of 720p video, which Logan Kilpatrick noted is the same as Veo 3.1 Fast.

ModelInputOutputPractical rate
Omni Flash (gemini-omni-flash-preview)$1.50 / 1M (text, image, video, audio)$17.50 / 1M video, $9.00 / 1M text≈ $0.10 per second of 720p video
NB2 Lite (gemini-3.1-flash-lite-image)$0.25 / 1M$30 / 1M images, $1.50 / 1M text$0.0336 / 1K image (batch $0.0168)
NB2 (gemini-3.1-flash-image)$0.50 / 1M$60 / 1M images$0.067 (1K) / $0.101 (2K) / $0.151 (4K) per image

Here is a worked example for a 60-second product reel:

Product reel, 60 seconds of hero footage
  10 candidate stills, NB2 Lite (1K)     10 x $0.0336 = $0.336
  6 hero clips x 10s = 60s Omni output   60 x $0.10   = $6.00
  3 conversational edits x 10s = 30s     30 x $0.10   = $3.00
  Input tokens                                        < $0.10
  ----------------------------------------------------------
  TOTAL                                            ~= $9.34

Formula: cost ~= (N_images x $0.0336) + (M_video_seconds x $0.10)

The gotcha to headline: every edit re-renders and re-bills the full clip duration. Three 10-second edits cost $3.00, not free tweaks. Video seconds dominate the bill; images are a rounding error. And batch image pricing ($0.0168) applies only through the Batch API on generateContent, not in the Interactions API yet, so interactive Omni pipelines pay standard image rates.

NB2 Lite to Omni Pipeline

Google's pitch is to chain the two models: use Nano Banana 2 Lite as a high-speed image generator, then pass that image to Omni Flash to animate it. Nano Banana 2 Lite generates a still in about 4 seconds at $0.0336 per 1K image, but the docs are explicit that it is not optimized for multiple reference inputs or multi-turn editing. So draft stills fast with Lite, then hand the winner to Omni Flash to animate and edit.

The most robust path is Pattern A: reference-passing. Generate the still, read its base64, and feed it into an image_to_video call. Because store defaults to true, the clip stays editable:

import base64
from google import genai
client = genai.Client()

# STEP 1 - NB2 Lite still
img = client.interactions.create(
    model="gemini-3.1-flash-lite-image",
    input="Studio product shot: matte-black ceramic mug on marble, soft window light, photorealistic."
)
image_b64 = img.output_image.data

# STEP 2 - Omni Flash animates it (store=True default keeps it editable)
vid = client.interactions.create(
    model="gemini-omni-flash-preview",
    input=[
        {"type": "image", "data": image_b64, "mime_type": "image/png"},
        {"type": "text", "text": "Slow cinematic push-in on the mug, steam rising, shallow depth of field. Single continuous shot."}
    ],
    generation_config={"video_config": {"task": "image_to_video"}},
)
with open("promo_v1.mp4", "wb") as f:
    f.write(base64.b64decode(vid.output_video.data))

# STEP 3 - conversational edit, no re-upload
edit = client.interactions.create(
    model="gemini-omni-flash-preview",
    previous_interaction_id=vid.id,
    input="Change the lighting to warm golden hour. Keep everything else the same."
)

There is also Pattern B: a single server-side session that mixes models, passing previous_interaction_id=img.id so Omni sees the NB2 Lite image directly. The Interactions “mixing interactions” best practice supports this in principle, but there is no explicit official image-to-Omni sample for it. Treat Pattern A as the tested path and Pattern B as the clean alternative to verify yourself.

Google demoed the pipeline as an AI Studio applet, “Omni Product Studio”: upload a product photo, Nano Banana 2 Lite generates brand-accurate assets, and Omni Flash renders them into video.

The Agent Skill

Google ships a coding-agent skill, gemini-omni-flash-api, that drives Omni via google-genai plus ffmpeg, so an agent (Claude Code, Antigravity, and similar) runs real scripts instead of guessing the API. It requires google-genai 2.10.0 or newer, Python 3.10 or newer, and ffmpeg/ffprobe on PATH. Bundled scripts include upload_file.py, generate_video.py, inspect_video.py, and prep_video.py.

# install into a coding agent
npx skills add google-gemini/gemini-skills --skill gemini-omni-flash-api

# generate
./scripts/video/generate_video.py "A close-up of a cat drinking tea" \
  --output media/cat_tea.mp4

# style-transfer an existing clip (strips input audio)
./scripts/video/generate_video.py "Transform the style to Japanese anime" \
  --video input.mp4 --strip-audio --output media/anime.mp4

# continue a session with no re-upload
./scripts/video/generate_video.py "Change the setting to a snowy winter wonderland." \
  --previous-interaction-id "abc123..." --output media/winter.mp4

One discrepancy to flag honestly: the skill exposes a “video interpolation” command (--image start.png --image end.png), but the API docs list interpolation and extension as not supported. Treat the skill's “interpolation” as convenience naming over two-image reference-to-video, not true keyframe interpolation. This skill pairs naturally with the tooling in our roundup of the best MCP servers for Claude Code, since Google also ships a companion Gemini Docs MCP for coding agents.

Limitations and Gotchas

  • 720p only, 24 FPS. No 4K. Duration caps at 10 seconds. Aspect ratios are 16:9 and 9:16.
  • Audio: output yes, input no. The official doc lists output as MP4 with audio, auto-scored and steerable from the prompt. The limitation is that Omni cannot accept an audio reference as input. If another source told you Omni has no audio, that is a misread of this input restriction.
  • store=true is mandatory for the chain. With store=false, the clip is non-editable, background=true breaks, and every edit path silently fails.
  • Regional block on uploaded-media editing. Editing videos you upload is blocked in the EEA, Switzerland, the UK, and some US states. Editing videos the model generated works everywhere.
  • Reference limits. Video references over 3 seconds are “accepted but not processed,” there are no audio references, and there is no multi-video reasoning.
  • Rate limits are not published. Google does not list fixed RPM/TPM/RPD; limits vary by tier and show in the AI Studio dashboard. The consumer Gemini app quota is separate from and stingier than the API quota.

The regional block has a nasty symptom: the request succeeds but returns nothing. If you hit that, our troubleshooting notes may help, but the tell is specific:

Symptom of the regional upload-edit block:
  a video-to-video edit completes quickly with empty output
  (total_output_tokens: 0, or no video content in steps[].content)

Fix: edit model-generated frames instead of uploaded media,
     or run from a supported region.

FAQ

What is Gemini Omni Flash?

Gemini Omni Flash (model ID gemini-omni-flash-preview) is Google's natively multimodal video model, launched in public preview for developers on June 30, 2026. It ingests text, images, and video and returns a 720p MP4 with audio, 3 to 10 seconds long, through the Interactions API.

What is the model ID for Gemini Omni Flash?

gemini-omni-flash-preview. It runs only through the Interactions API (POST /v1beta/interactions or client.interactions.create), not a standalone video endpoint.

How much does Gemini Omni Flash cost?

Video output works out to roughly $0.10 per second of 720p video, the same rate Logan Kilpatrick compared to Veo 3.1 Fast. Token pricing is $1.50 per 1M input and $17.50 per 1M video output. Every edit re-renders and re-bills the full clip duration, so three 10-second edits cost about $3.00, not free tweaks.

Does Gemini Omni Flash support audio?

Yes. The official docs list the output as MP4 video with audio, and the soundtrack is auto-scored and steerable from the prompt. The one audio limitation is on input: Omni Flash cannot accept an audio reference.

Can Omni Flash edit my own uploaded video?

Yes, through the Files API. But editing uploaded videos is blocked in the EEA, Switzerland, the UK, and some US states. If a video-to-video edit finishes fast with empty output (total_output_tokens: 0), that regional restriction is the likely cause. Editing videos the model generated works everywhere.

How do you chain Nano Banana 2 Lite and Omni Flash?

Generate a still with Nano Banana 2 Lite (gemini-3.1-flash-lite-image), then pass that image as a reference to Omni Flash with task image_to_video. Keep store=true so the clip stays editable and you can stack up to three sequential conversational edits.

What resolution does Omni Flash output?

720p at 24 FPS only, in 16:9 or 9:16. The official model page lists 720p as the sole resolution, so ignore any third-party 4K claims.

Glossary

TermMeaning
Interactions APIThe stateful endpoint (POST /v1beta/interactions) that every Omni Flash call runs through. Omni Flash has no standalone video endpoint.
gemini-omni-flash-previewThe model ID for Omni Flash. Public preview, so the schemas can still shift.
previous_interaction_idThe id of a prior interaction. Pass it to continue a server-side session so you never re-upload the video. It carries conversation history only.
storeFlag, default true. Persists interaction state (55 days paid, 1 day free). Required for editing and background jobs. store=false is a stateless one-shot.
taskgeneration_config.video_config field that tells the model what you want: text_to_video, image_to_video, reference_to_video, or edit.
FIRST_FRAME tagInline prompt tag that marks a supplied image as the starting frame of the video.
IMAGE_REF_N tagInline, zero-indexed prompt tag that references a supplied image as a style or subject reference.
delivery uriresponse_format option that returns a Files API URI instead of inline base64. Use it for clips over roughly 4 MB.
backgroundFlag that runs generation asynchronously: returns an id immediately, then you poll to completed. Requires store=true.
SynthIDGoogle's invisible, detectable watermark applied to every Omni Flash output.
Nano Banana 2 Litegemini-3.1-flash-lite-image, the fast GA image model used for the generation step before Omni Flash animates.

Verdict

Omni Flash is the first time text-to-video, image-to-video, and conversational editing sit behind one stateful API at a predictable rate. The pattern that pays off is the pipeline: draft stills with Nano Banana 2 Lite for pennies, animate the winner with Omni Flash, then edit in short plain-language turns. Budget the edits as full renders, keep store=true, and expect 720p. If your product is closer to text and reasoning than media, compare against the Gemini 3.5 Flash guide or the Claude Fable 5 benchmarks before you commit. The preview label is real: schemas can shift, so pin your SDK and re-check the docs before you ship.

Sources and Links

Everything above is grounded in official Google sources plus the verified launch posts, grouped below.

Get the latest on AI, LLMs & developer tools

New MCP servers, model updates, and guides like this one — delivered weekly.

Sponsored AI assistant. Recommendations may be paid.