◉GEMINI LABJP
●TTS — The three TTS preview models shut down on 12/18 per the deprecations page, not 11/17●CLI 0.68 — Gemini CLI stable is v0.68.0, with v0.69.0-preview.0 (11/10) on the preview channel●GEMINI 2.5 — gemini-2.5-pro and 2.5-flash shut down on the API on 12/1, 16 days left. Move to 3.8 Flash or 3.5 Flash-Lite●NODE 26 — On Node 26, Gemini CLI's timeout settings reportedly stop applying to model requests●OMNI 1.1 — From 12/3, requests to gemini-omni-1.1-flash are routed to 1.2 Flash automatically●NEW — Getting Consistent JSON Through the OpenAI-Compatible Layer, in Three Steps●TTS — The three TTS preview models shut down on 12/18 per the deprecations page, not 11/17●CLI 0.68 — Gemini CLI stable is v0.68.0, with v0.69.0-preview.0 (11/10) on the preview channel●GEMINI 2.5 — gemini-2.5-pro and 2.5-flash shut down on the API on 12/1, 16 days left. Move to 3.8 Flash or 3.5 Flash-Lite●NODE 26 — On Node 26, Gemini CLI's timeout settings reportedly stop applying to model requests●OMNI 1.1 — From 12/3, requests to gemini-omni-1.1-flash are routed to 1.2 Flash automatically●NEW — Getting Consistent JSON Through the OpenAI-Compatible Layer, in Three Steps
Articles/API / SDK
◈ API / SDK/2026-06-25Advanced

The Morning a Preview Image Model Went Dark — Migrating to GA Gemini Image Models and Building a Deprecation-Resilient Pipeline

With gemini-3.1-flash-image-preview and gemini-3-pro-image-preview retired, here is how to migrate to the GA models and design an image pipeline that no longer gets caught off guard by deprecation dates — with code and cost math, plus video-to-image thumbnail automation.

gemini-api291image-generation9deprecation9pipeline9python113automation55thumbnailproduction140

✦ Premium Article

An unattended image job starts returning 404 NOT_FOUND one morning, and the cause turns out to be not your code but an external model-retirement schedule. If you have lived through that, you know the particular frustration of it.

On June 25, 2026, two preview image models — gemini-3.1-flash-image-preview and gemini-3-pro-image-preview — were retired. In their place, the native image models graduated to general availability as gemini-3.1-flash-image (Flash Image) and gemini-3-pro-image (Pro Image).

I run several jobs that auto-generate artwork and thumbnails for wallpaper and wellness apps. Back when I hardcoded preview model IDs straight into the code, every retirement meant hunting down the affected lines and rewriting them — always reactive, always after the breakage. Learning from that, I want to share both the migration steps and, more importantly, a pipeline design that stops you from being whipped around by deprecation dates.

What actually changes between preview and GA

The first thing to internalize is that this is not a mere rename. Dropping the -preview suffix carries operational meaning.

AspectPreviewGA
Model IDgemini-3.1-flash-image-previewgemini-3.1-flash-image
Stability guaranteeNone (can be pulled with little notice)Yes (migration window on retirement)
PricingProvisional, may shiftFinalized
Production useDiscouraged (for evaluation)Recommended
Video-to-imagePartialSupported on Flash Image

Preview models always carried the assumption that they could disappear at any time. They are handy for evaluation and prototyping, but hardcoding one into an unattended production job was, in hindsight, a poorly considered design. GA models come with a migration window, so the same accident is far less likely.

That said, swapping in the GA model is not the end of the story. The day another model is retired will surely come. What matters is using this migration as the moment to bake in a structure that anticipates the next retirement.

The minimal migration: get the broken job running

Here is the minimal path when you need something working right now. For most code, swapping the model ID is enough.

from google import genai
 
client = genai.Client(api_key="YOUR_API_KEY")
 
# Before (retired):
# model = "gemini-3.1-flash-image-preview"
 
# After (GA):
model = "gemini-3.1-flash-image"
 
response = client.models.generate_content(
    model=model,
    contents="A calm minimalist wallpaper, soft gradient, muted teal",
)
 
# Generated images come back as parts
for part in response.candidates[0].content.parts:
    if part.inline_data is not None:
        with open("wallpaper.png", "wb") as f:
            f.write(part.inline_data.data)

One caution at this stage: even when the response shape is identical between preview and GA, the tone of the generated output can shift subtly. Reusing prompts verbatim may produce slightly different color or composition. Before sending anything to production, I recommend eyeballing the output for a handful of representative prompts.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Get the configuration-layer code that centralizes model IDs so you can switch from preview to GA (gemini-3.1-flash-image / gemini-3-pro-image) safely and in one place
✦Implement a model-lifecycle check with advance alerts that stops unattended jobs from silently breaking when a model is retired
✦Learn the video-to-image implementation for thumbnail generation and the cost math for folding it into a daily automation
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

◈ API / SDK2026-07-15
Sample what you already accepted — an audit budget that catches silent quality drift
A confidence gate only ever looks at output the model hesitated on. Silent drift sinks into the batch that sailed through. Working from a fixed 30-minutes-a-day review budget, this walks through deriving detection time from the binomial, reallocating the same budget across risk strata, and catching slow decay with a cumulative monitor.
◈ API / SDK2026-07-04
When Gemini API Leaks Japanese Into Your English Output Once in a While — Field Notes on Measuring the Contamination Rate and Tightening It in Stages
You told Gemini to answer in English, and 3 out of 100 runs slip a Japanese sentence into the tail. Here is why you cannot stop that 'once in a while', and a production pattern that measures the contamination rate as an SLO and tightens it with graded recovery, with working code.
◈ API / SDK2026-05-18
Gemini API asyncio Patterns for Production: How I Cut Processing Time by 80% in My Indie App Backend
A hands-on report on integrating Gemini API asyncio into a production backend. Covers Semaphore-based rate limiting, exponential backoff, partial failure handling, and what breaks when you move the same pipeline to the current google-genai SDK.