How to use the Gemini Omni 1.1 Flash API

Call gemini-omni-1.1-flash through Google's Interactions API: get a key, make your first curl and Python request, handle 4MB URI delivery, and save the call as a test in Apidog.

INEZA Felin-Michel

INEZA Felin-Michel

3 September 2026

How to use the Gemini Omni 1.1 Flash API

Apidog for Enterprise

On-Premises Deploy

SSO & RBAC

SOC 2 Compliant

Explore Apidog Enterprise

You call Gemini Omni 1.1 Flash with the model id gemini-omni-1.1-flash through Google’s Interactions API, not the generateContent endpoint you use for text models. That’s the first thing that trips people up. If you copy a Gemini text snippet and swap the model name, you get a 404.

This guide takes you from an empty terminal to a tested video generation request. You’ll get a key, make your first call in curl and Python, learn the parameters that exist (and the surprising list that doesn’t), handle large responses, and save the whole thing as a repeatable test.

The model went GA on August 27, 2026. For what shipped with it, see what’s new in Gemini Omni 1.1 Flash.

What you need before you start

Store the key as an environment variable rather than pasting it into source:

export GEMINI_API_KEY="your_key_here"

The official SDKs read that variable on their own, which keeps the secret out of your repo.

Your first video generation call

The endpoint is a POST to /v1beta/interactions. Here it is in curl:

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-omni-1.1-flash",
    "input": "A marble rolling fast on a chain reaction style track, continuous smooth shot."
  }'

Two fields: the model and the input. That’s the whole minimum request. The response carries the generated video as base64 in output_video.data.

In Python, install the SDK with pip install google-genai, then:

import base64
from google import genai

client = genai.Client()  # reads GEMINI_API_KEY from the environment

interaction = client.interactions.create(
    model="gemini-omni-1.1-flash",
    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 follows the same shape with @google/genai:

import { GoogleGenAI } from '@google/genai';
import * as fs from 'fs';

const ai = new GoogleGenAI({});

const interaction = await ai.interactions.create({
  model: 'gemini-omni-1.1-flash',
  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'));
}

Generation takes time. Latency scales with duration, resolution, and current API load, so set a generous client timeout before you decide something is broken.

Controlling resolution and aspect ratio

Everything about the output format goes in response_format:

interaction = client.interactions.create(
    model="gemini-omni-1.1-flash",
    input="A drone shot of a mountain landscape at sunrise.",
    response_format={
        "type": "video",
        "aspect_ratio": "16:9",
        "resolution": "1080p",
    },
)

The accepted values:

Field Values Default
type video video
aspect_ratio 16:9, 9:16 16:9
resolution 360p, 720p, 1080p, 4k 720p
delivery inline base64, uri inline

Draft at 360p. It generates up to 60% faster than 720p and costs a third as much, so your fifteen throwaway prompt attempts cost what five used to. Re-render the one you keep at a higher resolution. 1080p and 4k are upscales of the generated frames, not native renders. The pricing breakdown shows what each tier actually costs per second.

The parameters that don’t exist

This list matters more than the one above, because you will otherwise waste an afternoon:

If you need to exclude something from a shot, write the exclusion into the prompt itself. The docs’ own example does exactly that: “using the drawing only as a guide for movement, do not show the drawing in the final video.”

Image inputs, keyframes, and references

Pass a list instead of a string when you want to include media. Image to video:

interaction = client.interactions.create(
    model="gemini-omni-1.1-flash",
    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"},
    ],
)

Two images become a first frame and a last frame, and the model generates the motion between them:

interaction = client.interactions.create(
    model="gemini-omni-1.1-flash",
    input=[
        {"type": "image", "data": first_frame_b64, "mime_type": "image/jpeg"},
        {"type": "image", "data": last_frame_b64, "mime_type": "image/jpeg"},
        {"type": "text", "text": "A smooth cinematic transition from a lush green forest at sunrise to a snowy forest under a starry night sky."},
    ],
)

Video references work the same way through the Files API, capped at three clips of three seconds each. Audio on those clips is ignored; the model reads them for movement and appearance.

Multi-turn editing

This is what separates Omni from a plain text-to-video endpoint. Generate once, then edit conversationally by passing the previous interaction id:

res1 = client.interactions.create(
    model="gemini-omni-1.1-flash",
    input="A woman playing violin outdoors.",
)

res2 = client.interactions.create(
    model="gemini-omni-1.1-flash",
    previous_interaction_id=res1.id,
    input="Make the violin invisible.",
)

No re-upload, no re-describing the scene. The same mechanism drives scene extension, which is covered in the 40-second extension guide.

Handling videos over 4MB

Anything larger than 4MB comes back as a URI instead of inline base64, and the file needs to finish processing before you can download it. This is the bug most people hit at 1080p: their handler reads output_video.data, finds nothing, and reports a silent failure.

Ask for URI delivery explicitly and poll:

import time
from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-omni-1.1-flash",
    input="A beautiful sunset.",
    response_format={"type": "video", "delivery": "uri"},
)

video_output = interaction.output_video
file_name = video_output.uri.split("/")[-1]

while True:
    f_info = client.files.get(name=f"files/{file_name}")
    if f_info.state.name == "ACTIVE":
        break
    if f_info.state.name == "FAILED":
        raise RuntimeError("Generation failed.")
    time.sleep(5)

video_bytes = client.files.download(file=video_output.uri)
with open("output.mp4", "wb") as f:
    f.write(video_bytes)

Write your response handler to accept both shapes from the start. Resolution changes which one you get.

Test the request in Apidog

Once the call works, the problem shifts. You now have an expensive, slow, non-deterministic endpoint sitting in your critical path, and you need to know when it changes behavior. Ad-hoc curl commands in shell history don’t tell you that.

Set it up once in Apidog:

  1. Create a project and an environment. Put GEMINI_API_KEY and MODEL_ID in environment variables so the key never lands in the saved request.
  2. Add the request. POST to https://generativelanguage.googleapis.com/v1beta/interactions, JSON body with model and input. Reference the variables with {{MODEL_ID}}.
  3. Raise the timeout. Video generation runs far longer than a text completion, and the default client timeout will cut it off.
  4. Add assertions. Check the status code, check that output_video exists, and check the response shape you expect at your resolution. This is the assertion that catches the inline-versus-URI switch.
  5. Duplicate for each task type. One saved request each for text-to-video, image-to-video, and extension. When Google ships Omni 1.2, you run three requests and know in minutes what moved.

Apidog doesn’t generate video and it isn’t an AI framework. It’s where you build the request, send it, and hold the response to a standard you set. Download Apidog if you want that harness in place before you scale up spend.

Common errors and fixes

404 on the endpoint. You’re calling /v1beta/models/gemini-omni-1.1-flash:generateContent. Omni uses /v1beta/interactions with the model in the body.

Empty output_video.data. The response came back as a URI because the video exceeded 4MB. Read output_video.uri and download through the Files API.

Model not found. Check for gemini-omni-flash-preview in your config. That endpoint retires on September 30, 2026.

Editing an uploaded video fails. Uploaded-video editing is unavailable in the EEA, Switzerland, and the UK. Model-generated videos still work there.

Extension request rejected. Input videos cap at 10 seconds, extension only appends to the end, and you can’t add dialogue when extending an upload.

FAQ

What endpoint does Gemini Omni use? POST https://generativelanguage.googleapis.com/v1beta/interactions, with gemini-omni-1.1-flash in the request body.

Is there a free tier for the Gemini Omni API? No. Every generation bills. The text models are the ones with a free AI Studio lane.

Can I set temperature or a negative prompt? No. System instructions, temperature, top_p, stop sequences, and negative prompts are all unsupported. Put exclusions in the prompt text.

How do I generate vertical video? Set aspect_ratio to 9:16 in response_format.

Are generated videos watermarked? Yes. All output carries SynthID, invisible to viewers and detectable programmatically.

How does this compare to the Veo API? Different endpoint, different pricing, different strengths. Omni 1.1 Flash vs Veo 3.1 covers the tradeoff, and the Veo 3.1 API guide has that integration’s specifics.

The whole integration is two required fields plus a response handler that copes with both delivery shapes. Get a 360p call working first, save it with assertions, then raise the resolution once you trust the plumbing. Read the official Omni docs for the parameter list as it evolves.

Explore more

DeepSeek-V4.1-Flash Vision API: How to Send Images to DeepSeek's Native Multimodal Model

DeepSeek-V4.1-Flash Vision API: How to Send Images to DeepSeek's Native Multimodal Model

Send images to DeepSeek-V4.1-Flash via the deepseek-flash id: base64, URL, and file ID formats, the detail field, image pricing, and an Apidog test loop.

10 September 2026

How to Use DeepSeek-V4.1-Flash for Free: Every Option in 2026

How to Use DeepSeek-V4.1-Flash for Free: Every Option in 2026

Every honest way to use DeepSeek-V4.1-Flash for free in 2026: chat app, MIT weights, router free tiers, and the $1.35/month official API math.

10 September 2026

How to Run DeepSeek-V4.1-Flash Locally ?

How to Run DeepSeek-V4.1-Flash Locally ?

Can you run DeepSeek-V4.1-Flash locally? The memory math for 552B MIT weights, the 890-byte FP4 KV cache, realistic hardware tiers, and setup commands.

10 September 2026

Practice API Design-first in Apidog

Discover an easier way to build and use APIs

How to use the Gemini Omni 1.1 Flash API