Gemini Omni Flash API Tutorial: Model ID, Pricing, and Working Code (July 2026)
Gemini Omni Flash API is in public preview: model ID gemini-omni-flash-preview, $0.10/sec, 720p, 3–10s clips. Working Python, JS, and curl examples inside.
Quick Answer
The Gemini Omni Flash API is live. On June 30, 2026, Google opened the model to developers in public preview through Google AI Studio and the Gemini API, under the model ID gemini-omni-flash-preview. Pricing is $0.10 per second of output video — a 10-second clip costs about $1.00, the same rate as Veo 3.1 Fast. The API generates 3–10-second clips at 720p from text, images, or short video references, and its differentiating feature is conversational editing: you chain requests with previous_interaction_id via the Interactions API and refine a clip across turns instead of re-rolling it. If you were looking for a waitlist, you can skip it — a free API key from AI Studio is enough to run every example below. This tutorial covers setup, working Python, JavaScript, and curl examples for text-to-video, image-to-video, and multi-turn editing, plus the parameter table, the current limits, and the costs to model before production.
Key Takeaways
- Public preview since June 30, 2026 via Google AI Studio, the Gemini API, and the Gemini Enterprise Agent Platform. Preview, not GA — expect the surface to change.
- Model ID:
gemini-omni-flash-preview. It runs on the new Interactions API (client.interactions.create), not thegenerate_videospattern Veo uses. - Pricing: $0.10 per second of output. 5 seconds = $0.50, 10 seconds = $1.00 — identical to Veo 3.1 Fast.
- Output: 3–10-second clips at 720p. No 1080p or 4K option in the preview; Veo 3.1 remains the API choice for higher resolutions.
- Conversational editing is the headline feature. Pass
previous_interaction_idto edit the prior result while the scene, characters, and physics carry over. - Hard limits today: video references capped at 3 seconds, no reasoning across multiple videos, no voice editing, and no
temperature, system instructions, or negative prompts.
What shipped on June 30 — and what "public preview" means
Google announced developer access in its official launch post: Gemini Omni Flash is available "in public preview starting today in Google AI Studio and the Gemini API," alongside the generally available Nano Banana 2 Lite image model. Public preview means the model string carries a -preview suffix, quotas are conservative, and Google reserves the right to change parameters and behavior before GA. It also means the six-week stretch of "coming weeks" — which we tracked skeptically in our API status post — is over. There is now a real model ID, a published price, and documentation with runnable code.
Consumer access hasn't changed: the Gemini app and Google Flow for AI Plus/Pro/Ultra subscribers, plus free generation inside YouTube Shorts and YouTube Create. What's new is that you can now call the same model programmatically.
Pricing: $0.10 per second of output
| Clip length | Cost per generation |
|---|---|
| 3 seconds | $0.30 |
| 5 seconds | $0.50 |
| 8 seconds | $0.80 |
| 10 seconds | $1.00 |
Three things to model before you wire this into a product:
- Edits bill like generations. Each conversational-edit turn renders new output seconds. A 5-second clip plus three refinement turns is ~$2.00, not $0.50.
- There is no draft tier. Every roll is 720p at full price. If you iterate on look-and-feel, do it on cheap still images first — that's exactly the pipeline Google recommends, covered in our Nano Banana 2 Lite + Omni Flash workflow guide.
- Rate limits are preview-tier. Google hasn't published hard preview quotas on the pricing page; check your AI Studio project's quota panel before load-testing.
Setup
- Create a free API key in Google AI Studio.
- Install the SDK:
pip install google-genai(Python) ornpm install @google/genai(JavaScript). - Export the key as
GEMINI_API_KEY— both SDKs pick it up automatically.
Text-to-video
The Interactions API returns the video directly on the interaction object — note that this is a different shape from Veo's long-running generate_videos operations.
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=$GEMINI_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."
}'
Prompting works the way it does in the consumer app: describe the shot, the motion, and the camera in plain language. Our prompt template library and the prompt gallery transfer directly.
Image-to-video and reference images
Mix image and text parts in the input array. A single image acts as the starting frame or a style/motion guide, depending on what your text asks for:
import base64
from google import genai
client = genai.Client()
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"}
],
)
with open("clownfish.mp4", "wb") as f:
f.write(base64.b64decode(interaction.output_video.data))
Multiple images work as subject references — the model composes them into one scene:
interaction = client.interactions.create(
model="gemini-omni-flash-preview",
input=[
{"type": "image", "data": cat_b64, "mime_type": "image/png"},
{"type": "image", "data": yarn_b64, "mime_type": "image/png"},
{"type": "text", "text": "A cat playfully batting at a ball of yarn."}
],
)
For the craft side of image-to-video — choosing source frames, writing motion prompts, keeping subjects consistent — see the image-to-video guide.
Conversational editing with previous_interaction_id
This is the feature no other video API currently matches. Instead of re-prompting from scratch, you reference the previous interaction and describe only the change; characters, scene, and physics carry over:
import base64
from google import genai
client = genai.Client()
# Turn 1: generate the initial video
res1 = client.interactions.create(
model="gemini-omni-flash-preview",
input="A woman playing violin outdoors."
)
# Turn 2: edit the previous video
res2 = client.interactions.create(
model="gemini-omni-flash-preview",
previous_interaction_id=res1.id,
input="Make the violin invisible."
)
with open("example.mp4", "wb") as f:
f.write(base64.b64decode(res2.output_video.data))
Google's launch post notes the Interactions API maintains session context for up to three sequential edits. The one-instruction-per-turn discipline we describe in the conversational editing guide applies verbatim here: small, single-change edits land far more reliably than compound ones.
Parameters and current limits
| Parameter | Values | Notes |
|---|---|---|
aspect_ratio | 16:9, 9:16 | Landscape is the default |
task | text_to_video, image_to_video, reference_to_video, edit | Optional — the model infers it from your input if unset |
previous_interaction_id | interaction ID string | Required for multi-turn editing |
Known limits in the preview, per Google's docs:
- Output is 720p, 3–10 seconds. No 1080p/4K.
- Video references are capped at 3 seconds, and reasoning across multiple input videos is not supported.
- Voice editing is not supported.
- No system instructions,
temperature,top_p, stop sequences, or negative prompts — prompt text is the only steering wheel. - Regional availability is restricted in some markets; check the model page in Google's docs for your region.
For working around the 10-second cap specifically — storyboard stitching and last-frame chaining, with cost math — see how to make Omni Flash videos longer than 10 seconds.
Should you build on a preview model?
The honest trade-off: the capability is real and the price is competitive, but -preview means breaking changes are fair game and quotas are tight. Two practical hedges. First, isolate the Omni Flash call behind your own interface so a parameter rename doesn't ripple through your product. Second, if your use case needs 1080p+, longer clips, or GA stability guarantees today, Veo 3.1 remains the conservative API pick — see Omni Flash vs Veo 3.1 for the dimension-by-dimension comparison.
And if you don't want to write integration code at all: Omni Flash gives you an Omni-era generation and conversational-editing workflow in the browser — prompt, generate, refine — with no API key or SDK setup.
FAQ
Is the Gemini Omni Flash API generally available?
No — public preview, as of June 30, 2026. There's a real model ID (gemini-omni-flash-preview), published pricing ($0.10/second), and documentation, but Google can change parameters, quotas, and behavior before GA.
How much does a 10-second video cost via the API?
About $1.00 — output is billed at $0.10 per second. Budget conversational edits at the same rate: each edit turn renders new output seconds.
Can I generate 1080p or 4K with Omni Flash?
Not in the preview — output is 720p only. For higher resolutions via API, use Veo 3.1, which scales to 4K.
Do I need Vertex AI or an enterprise account?
No. A free API key from Google AI Studio is enough for the public preview. Enterprise customers can also access the model through the Gemini Enterprise Agent Platform.
Can I use Omni Flash without writing code?
Yes — the Gemini app and Google Flow (AI Plus/Pro/Ultra), YouTube Shorts and YouTube Create for free, or the Omni Flash studio in the browser with no API setup.
Is Omni Flash affiliated with Google?
No. Omni Flash is an independent platform built for the Gemini Omni era. It is not affiliated with Google. Gemini, Gemini Omni, Omni Flash, Veo, and related names are trademarks of their respective owners.
Next steps
- Try the Omni Flash studio → — generation and conversational editing in the browser, no API key required.
- Read: Nano Banana 2 Lite + Omni Flash workflow → — Google's recommended cheap-image-first pipeline, with cost math.
- Read: Conversational video editing → — the prompting discipline that makes multi-turn edits land.
- Browse the AI Prompt Gallery → — copy-ready prompts that transfer directly to the API.
- Read: Omni Flash vs Veo 3.1 → — when to pick the GA model instead.
- Compare credit packs → — generate without managing API keys, quotas, or preview churn.