Skip to main content

Native Image & Video Generation: Nano Banana & Omni Flash — Mastering the Gemini API

[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3
SEQ. 4

Native Image & Video Generation: Nano Banana & Omni Flash

✨ Mastering the Gemini API 14m 300 BASE XP⌨ HANDS-ON LAB

Beyond Text: Native Media Generation

Gemini doesn't just understand images and video - it generates and edits them natively, conversationally, in the same API you already use for text. Google groups its native image models under the Nano Banana family.

The Nano Banana Family

ModelBest For
Nano Banana 2.1 (gemini-nano-banana-2.1)GA production standard (October 2026) - ultra-crisp 1K–4K text & photorealistic synthesis on Vertex AI global endpoints
Nano Banana 2 Lite (gemini-3.1-flash-lite-image)Fastest, cheapest option - ultra-low latency, high-volume image generation (GA June 2026)
Nano Banana 2 (gemini-3.1-flash-image)Default all-rounder - 4K output, strong text rendering, up to 14 reference images
Nano Banana Pro (gemini-3-pro-image)Premium tier - deepest world knowledge, Google Search grounding, highest fidelity
Nano Banana (gemini-2.5-flash-image)Retired on Vertex AI in October 2026 alongside the Gemini 2.5 model family
from google import genai
import base64

client = genai.Client(vertexai=True, project="my-gcp-project", location="global")

interaction = client.interactions.create(
    model="gemini-3.1-flash-image",
    input="Create a picture of a nano banana dish in a fancy restaurant with a Gemini theme",
)

with open("generated_image.png", "wb") as f:
    f.write(base64.b64decode(interaction.output_image.data))
📢 Lifecycle notice: Google's standalone Imagen 3 and Imagen 4 (imagen-4.0-*) endpoints were retired on August 17, 2026 - the Nano Banana family (led by gemini-nano-banana-2.1) is now the production standard for native image generation on Vertex AI.

Veo 3 & Gemini Omni Flash: Native Video Generation

Veo 3 is Google DeepMind's state-of-the-art HD video model on Vertex AI, introducing native audio generation (sound effects, ambient environments, and lip-synced character dialogue) with realistic physics. Alongside it, Gemini Omni Flash (gemini-omni-flash-preview) generates 3–10 second, 720p videos with audio from a text prompt or a still image, and supports conversational, multi-turn editing of the result - describe a change and it re-renders while preserving what you didn't mention.

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

# Conversational edit - references the previous generation
res2 = client.interactions.create(
    model="gemini-omni-flash-preview",
    previous_interaction_id=res1.id,
    input="Make the violin invisible."
)

All Nano Banana and Omni Flash outputs include an invisible SynthID watermark for programmatic provenance verification.

⌨ HANDS-ON LABGenerate Images with Nano Banana 2.1 on Vertex AI
⭐ +150 XP

Call the Nano Banana 2.1 (gemini-nano-banana-2.1) global endpoint on Vertex AI to synthesize photorealistic visuals natively.

1Execute a native image generation request with Nano Banana 2.1 on Vertex AI.
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 1 — type "hint" if stuck
SYNAPSE VERIFICATION
QUERY 1 // 3
Which Nano Banana model is optimized for the lowest latency and cost?
Nano Banana Pro
Nano Banana 2
Nano Banana 2 Lite
Imagen 4 Ultra