GEMINI LABJP
OUTAGE — Gemini recovers from one of its biggest outages (errors 1076/1099) as engineering mitigations take effectDAILY-BRIEF — The new Daily Brief agent works overnight, analyzing your inbox, calendar, and tasks into a personalized morning digestGEMINI-OMNI — Gemini Omni combines Gemini with Google's generative media models to produce consistent, high-quality video from a single promptENTERPRISE — Gemini 3.5 Flash is enabled by default in Gemini Enterprise as of Jun 8 and can no longer be turned offDEPRECATION — Image preview models (3.1-flash-image / 3-pro-image) shut down Jun 25; migrate to the GA versions nowFILE-SEARCH — File Search now supports multimodal search, natively embedding and searching images via gemini-embedding-2OUTAGE — Gemini recovers from one of its biggest outages (errors 1076/1099) as engineering mitigations take effectDAILY-BRIEF — The new Daily Brief agent works overnight, analyzing your inbox, calendar, and tasks into a personalized morning digestGEMINI-OMNI — Gemini Omni combines Gemini with Google's generative media models to produce consistent, high-quality video from a single promptENTERPRISE — Gemini 3.5 Flash is enabled by default in Gemini Enterprise as of Jun 8 and can no longer be turned offDEPRECATION — Image preview models (3.1-flash-image / 3-pro-image) shut down Jun 25; migrate to the GA versions nowFILE-SEARCH — File Search now supports multimodal search, natively embedding and searching images via gemini-embedding-2
Articles/API / SDK
API / SDK/2026-06-12Intermediate

Gemini's Preview Image Models Shut Down on June 25 — Code Diffs and Checks From an Actual GA Migration

How I moved my image pipeline off Gemini's preview image models before the June 25 shutdown — confirming GA model IDs, Python code diffs, regression checks, and a safe cutover order.

gemini-api220image-generation3model-migration3deprecation3gemini-3-1-flash-imagePython34TypeScript6

Premium Article

On June 25, the Gemini API shuts down two preview image-generation models: gemini-3.1-flash-image-preview and gemini-3-pro-image-preview. The date is confirmed on the official deprecations page, which leaves roughly two weeks.

I run a batch pipeline that generates image variations for a wallpaper app I maintain as an indie developer, and I assumed my main path had long been migrated. Then I did an actual audit and found a side script — a prototyping tool I had written months ago — still pointing at the preview model. What I had budgeted as a "swap one model ID" task turned out to involve a wrong-ID 404, and a category of verification that becomes permanently impossible after the shutdown date.

Here is the working log: every step from audit to cutover, plus the differences I could actually measure between the preview and GA models, with runnable code.

What stops, and what replaces it

Two dedicated image-generation preview models are being retired, and each has a GA counterpart that has been generally available since May 28. So there is no "the replacement isn't ready yet" problem here.

  • gemini-3.1-flash-image-preview → migrate to gemini-3.1-flash-image
  • gemini-3-pro-image-preview → migrate to gemini-3-pro-image

Let me share the first trap I stepped into. I typed the pro-tier GA model as gemini-3.1-pro-image and got a 404 NOT_FOUND. The flash model carries the "3.1" version, but the pro model's official ID stays at "3" — the correct ID is simply the preview name with -preview removed. Product announcements sometimes write the pair loosely as "Gemini 3.1 Flash Image / 3.1 Pro Image," so if you reconstruct IDs from memory, you may take the same detour I did.

One scoping note: this shutdown concerns the dedicated image-generation model family. It does not affect the native Image Output capability of the main Gemini 3.2 Flash model — if that is all you use, you can stop reading here.

June has been a month of stacked deadlines for the Gemini API. The legacy Interactions API schema was deleted on June 8 (I wrote up that migration in Gemini Interactions API: Fixing What Broke When the Legacy outputs Schema Was Removed on June 6), the individual tiers of Gemini CLI and the Code Assist IDE extension wind down on June 18, and the image preview models follow on June 25. Putting all three dates on a calendar is a small act that prevents exactly the kind of straggler script I found.

Audit your code first — model IDs hide outside the code, too

The first job is finding every reference to the preview models, and I recommend searching for the substring image-preview rather than the full model IDs. A partial match still catches alias constants and abbreviated config values.

# Search broadly for the substring instead of exact model IDs
grep -rn "image-preview" \
  --include="*.py" --include="*.ts" --include="*.js" \
  --include="*.env*" --include="*.yaml" --include="*.yml" \
  --include="*.json" --include="*.toml" \
  .

In my repository this turned up two Python scripts and one .env file. The near miss was an environment variable hard-coded inside a GitHub Actions workflow definition — it shows up if you grep from the repository root, but it is exactly the kind of place you skip once you have told yourself "code is fixed, config is fixed."

Some references live entirely outside the repository. If you distribute model IDs through Firebase Remote Config or a settings table in your database, grep will never see them; open the actual admin console and read the live values.

I keep a general checklist for deprecation work in How to Handle Gemini API Model Deprecation and Migration Errors, but this particular migration is narrow — two models — so an accurate audit is most of the work.

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
Move your code off gemini-3.1-flash-image-preview and gemini-3-pro-image-preview before the June 25 shutdown, from audit to full cutover
Get working Python and TypeScript snippets: confirming GA model IDs with models.list, before/after call diffs, and error handling that separates 404 from 429
Run the preview-vs-GA regression comparison that becomes impossible after the shutdown, and adapt the 60-prompt method to your own image pipeline
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-06-11
Gemini 3.2 API Developer Guide — Correct Model IDs, Migration from 3.1, and Production Checklist
A practical guide to calling Gemini 3.2 via the API: correct model IDs, what changed from Gemini 3.1, Python and TypeScript code examples, and a production migration checklist.
API / SDK2026-05-25
When gemini-2.5-flash-image Ignores Your Reference Image — Diagnosing Why Nano Banana Returns a Totally Different Picture
A field-tested triage order for the situations where gemini-2.5-flash-image (Nano Banana) silently ignores your reference image, swaps the subject, or refuses to honor your edit instructions. Covers parts ordering, response_modalities, image size, and chat-session pitfalls with runnable code.
API / SDK2026-05-23
Designing Around the Gemini 2.0 Flash Deprecation Without Letting It Disrupt Indie Development: My May 2026 Risk-Distribution Notes
How I rebuilt my indie-development jobs to absorb the upcoming Gemini 2.0 Flash deprecation - provider abstraction, cost numbers, a rehearsal day, captured from my May 2026 review.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →