Developer Tools & APIs

Google is shutting down its Gemini image preview models on June 25 — here's how to migrate

Gemini's preview image generation models are deprecated with a hard shutdown on June 25, 2026. Here's what to change and when.

developer tools apis category

Update, 24 June 2026: All Firebase Imagen models shut down today — migrate to Nano Banana now

The shutdown has arrived one day ahead of the June 25 deadline covered in this article. As of June 24, 2026, all Imagen models on Firebase AI Logic are shut down and no longer accessible. Any app still calling a deprecated Imagen model name will receive a 404 error, meaning broken image generation in production.

The replacement is the Gemini Image (“Nano Banana”) family, now Generally Available. Google recommends gemini-3.1-flash-image as the primary target. There are four concrete changes required to migrate:

  1. Replace your ImagenModel instance with a GenerativeModel instance pointing to a Gemini Image model.
  2. Swap ImagenGenerationConfig for GenerationConfig, with an optional nested ImageConfig (requires the May 2026 SDK or later).
  3. Set a response modality of IMAGE inside GenerationConfig.
  4. If using the Vertex AI Gemini API, update your model location to a supported region, with global recommended.

Note that Gemini Image models require the pay-as-you-go Blaze pricing plan regardless of your API provider. Google also recommends using Firebase Remote Config to manage your model name so future transitions do not require a full app release.

Full migration steps are in the Firebase Imagen migration guide. For urgent production issues, contact Firebase Support directly.

Update, 25 June 2026: Gemini image preview models are now shut down — today is the hard deadline

The shutdown date covered in this article has now arrived. As of today, gemini-3.1-flash-image-preview and gemini-3-pro-image-preview are fully offline. Any application still calling these model IDs will receive errors immediately. There is no grace period.

The GA replacements have been available since late May and are the migration targets to use right now:

Deprecated (broken today)Replace with
gemini-3.1-flash-image-previewgemini-3.1-flash-image
gemini-3-pro-image-previewgemini-3-pro-image

The GA models carry one notable addition over the preview versions: gemini-3.1-flash-image now supports video-to-image generation, accepting a video file or public YouTube URL as multimodal context alongside a text prompt.

Neither gemini-3.1-flash-image nor gemini-3.5-flash currently have a shutdown date listed in the Gemini deprecations table, so the GA image model is a stable long-term target. The June 25 date held exactly as announced, per the Gemini API changelog. If you have not migrated yet, the original guidance in this article still applies, but the urgency is now immediate.

Update, 23 June 2026: Vertex AI image preview endpoints deprecated on Gemini Enterprise — migrate before July 17, 2026

The original article covered the Gemini API shutdown of gemini-3.1-flash-image-preview and gemini-3-pro-image-preview on June 25, 2026. There is now a second, later deadline that applies to a different surface.

If your image generation calls route through the Gemini Enterprise Agent Platform (the rebrand of Vertex AI, which no longer appears as a standalone service in the Google Cloud Console), your cutoff is July 17, 2026, not June 25. The Gemini Enterprise Agent Platform release notes list both preview endpoints as deprecated on that platform, with the July 17 date as the hard shutdown.

The GA replacements are the same as those covered in this article: swap gemini-3.1-flash-image-preview for gemini-3.1-flash-image, and gemini-3-pro-image-preview for gemini-3-pro-image. Both GA models carry production-grade SLAs that the preview models lacked.

In summary: the deadline you need to hit depends on which surface you are calling. The Gemini API deadline has already passed as of today. Teams on the Enterprise Agent Platform have until July 17. Audit your endpoint strings now, update the model identifier, and test before the cutoff to avoid a service interruption.

Update, 23 June 2026: Gemini image preview models shut down tomorrow (June 25) — last call to migrate

The shutdown is now one day away. gemini-3.1-flash-image-preview and gemini-3-pro-image-preview are being retired on June 25, 2026, and there is no automatic redirect. Any production code still pointing to these model IDs will begin returning errors immediately after cutoff.

Since this article was first published, Google has shipped the stable GA replacements, which removes any remaining uncertainty about migration targets. The swap is straightforward:

Deprecated (shut down June 25)GA replacement
gemini-3.1-flash-image-previewgemini-3.1-flash-image
gemini-3-pro-image-previewgemini-3-pro-image

The GA models also add meaningful new capabilities. gemini-3.1-flash-image gains a 512px resolution option, improved text rendering for infographics, Grounding with Google Search, and video-to-image generation support (via direct upload or public YouTube URL). These features were not available in the preview versions.

If your integration is still using the old model IDs, update the model string, test your critical workflows, and deploy before tomorrow. That is the complete action required.

Sources: Google AI changelog, image generation guide.

Update, 22 June 2026: Gemini Enterprise Agent Platform: Image Preview Models Deprecated with July 17 Deadline

If you migrated away from the preview image models after reading this post, you may still have work to do. Google has issued a separate deprecation notice covering the same two model IDs on the Gemini Enterprise Agent Platform (Google Cloud), with a hard shutdown on July 17, 2026 — a distinct deadline from the June 25 cutoff on the standard Gemini API.

The affected models are identical: gemini-3.1-flash-image-preview and gemini-3-pro-image-preview. The migration path is also the same — drop the -preview suffix to reach the GA endpoints (gemini-3.1-flash-image and gemini-3-pro-image). These stable versions carry production SLA commitments and are documented in the Gemini Enterprise Agent Platform release notes, updated June 19, 2026.

This is not an extension of the June 25 deadline. It is a parallel deprecation on a different platform surface. Developers who already updated their standard Gemini API calls should now audit any Google Cloud pipelines or agent workflows that may still reference the preview model IDs. Calls to those endpoints on the Enterprise Agent Platform will fail after July 17. The model-specific deprecation detail confirms the timeline and recommended replacements.

Update, 19 June 2026: Gemini Enterprise Agent Platform Deprecates Flash and Pro Image Preview Models — Migrate by July 17

The original post covered the June 25, 2026 hard shutdown for gemini-3.1-flash-image-preview and gemini-3-pro-image-preview on the Gemini API and Google AI Studio. There is now a second deadline to be aware of.

The Gemini Enterprise Agent Platform release notes (last updated June 19, 2026) confirm that both models are also deprecated on that platform, with a separate hard shutdown date of July 17, 2026. Teams running these model IDs through the Enterprise Agent Platform have a few extra weeks past the June 25 cutoff, but the July 17 deadline is firm and service disruption will follow if endpoints are not updated in time.

The deadlines now split across two surfaces:

PlatformHard Shutdown
Gemini API / Google AI StudioJune 25, 2026
Gemini Enterprise Agent PlatformJuly 17, 2026

If your pipelines run through the Enterprise Agent Platform, check the Gemini 3 Pro Image Preview model page for the specific replacement endpoint names. The migration steps in the original post still apply. Do not treat the later date as extra runway unless you have confirmed which platform surface your calls are routed through.

Update, 17 June 2026: Gemini Enterprise Agent Platform deprecates Gemini 3.1 Flash Image Preview and Gemini 3 Pro Image Preview with a July 17 deadline

If you are running these image preview models through the Gemini Enterprise Agent Platform on Google Cloud, you face a separate July 17, 2026 deadline that is not covered by the June 25 shutdown described in the original article.

Google has deprecated gemini-3.1-flash-image-preview and gemini-3-pro-image-preview on the Enterprise Agent Platform and recommends updating model endpoints before July 17 to avoid service disruption (Enterprise Agent Platform release notes). The June 25 hard shutdown still applies to the same model IDs on the Gemini developer API at ai.google.dev, but that deadline does not cover Enterprise Agent Platform usage.

The recommended migration targets on the Enterprise Agent Platform are the now-generally-available Gemini 3.1 Flash Image and Gemini 3 Pro Image endpoints. These GA releases also add support for 4K image outputs in Preview, and Gemini 3.1 Flash Image additionally supports video inputs in Preview (Gemini 3 Pro Image Preview model page).

Teams that completed their migration for the June 25 developer API deadline may still need to act if they also have workloads running through the Enterprise Agent Platform.

Update, 17 June 2026: Google deprecates Imagen 4 models on the Gemini API with an August 17, 2026 shutdown date

Google has announced the deprecation of all three stable Imagen 4 model IDs on the Gemini API: imagen-4.0-generate-001, imagen-4.0-ultra-generate-001, and imagen-4.0-fast-generate-001. The hard shutdown date is August 17, 2026. Full details are on the official Imagen 4 documentation page and the Gemini deprecations tracker.

This is a separate wave from the June 25 shutdown covered in the article below, which targets the preview endpoints (gemini-3.1-flash-image-preview and gemini-3-pro-image-preview). If you use Imagen 4 GA models rather than those preview endpoints, you were not affected by the June 25 deadline, but you now have your own urgent deadline to meet.

The recommended migration target is the Gemini image generation model family, with Google specifically pointing developers toward gemini-3.1-flash-image. Migration requires three code changes: update the model name to a supported Gemini image model, switch from client.models.generate_images to client.models.generate_content, and update your response handling to work with content parts rather than a dedicated image response object.

The rest of this article covers the June 25 preview model shutdown, but the migration pattern it describes applies equally to the August 17 Imagen 4 deadline.

Update, 16 June 2026: Gemini Enterprise Agent Platform image preview models deprecated — July 17 shutdown

If you use Gemini image preview models on the Gemini Enterprise Agent Platform, you have a separate, later deadline than the one covered in this article.

Google has deprecated Gemini 3.1 Flash Image Preview and Gemini 3 Pro Image Preview on the Enterprise Agent Platform with a shutdown date of July 17, 2026 (release notes). This is roughly three weeks after the June 25 shutdown of the same models on the Gemini API.

The key point is that these are two independent deadlines for the same two models. Where you are using them determines which date applies to you:

  • Gemini API: shut down June 25, 2026
  • Gemini Enterprise Agent Platform: shut down July 17, 2026

The recommended migration targets are the same on both platforms: the generally available gemini-3.1-flash-image and gemini-3-pro-image models (model details).

If your team runs image generation workloads on both platforms, track and act on both deadlines independently. The extra three weeks on the Enterprise Agent Platform does not change the migration path, only the deadline.

If you have gemini-3.1-flash-image-preview or gemini-3-pro-image-preview anywhere in your codebase, you have until June 25, 2026 to update those strings. After that date, calls to those endpoints will fail with no fallback. This is a hard shutdown, not a soft deprecation with graceful degradation.

The good news is that the fix is straightforward: the GA (generally available) replacements are already live, the capabilities are equivalent or better, and the migration is, in most cases, a find-and-replace job.

What changed and why

On May 28, 2026, Google promoted both preview image models to full General Availability:

  • gemini-3.1-flash-image-preview became gemini-3.1-flash-image
  • gemini-3-pro-image-preview became gemini-3-pro-image

Preview model IDs in the Gemini API have always carried a caveat: no SLA guarantees, potential behaviour changes, and eventual deprecation once the stable version ships. That lifecycle has now completed for both of these models. The -preview suffix is retired; the stable versions carry production-grade SLAs and are the right choice for any workload that matters.

There is also a third model caught in this: gemini-3.1-flash-lite-preview has already been shut down. If you are using that one, migrate to gemini-3.1-flash-lite immediately.

The migration table

Deprecated model (shuts down June 25, 2026)GA replacement
gemini-3.1-flash-image-previewgemini-3.1-flash-image
gemini-3-pro-image-previewgemini-3-pro-image

That is the entire migration for the vast majority of developers. No API restructuring, no new authentication, no prompt changes required.

What you get with the GA versions

Beyond the stability guarantee, the GA models ship with meaningful capability improvements over the preview versions they replace.

gemini-3.1-flash-image is the high-throughput option: fast, cost-efficient, and now ranked number one on the Artificial Analysis Image Arena blind evaluation leaderboard. It also gains a new feature at GA: video-to-image generation. You can pass a video file or a YouTube URL alongside a text prompt to generate thumbnails, movie posters, or summary infographics. That feature is exclusive to the Flash model.

gemini-3-pro-image targets the more demanding end of the creative spectrum: complex graphic design, high-fidelity product mockups, and anything requiring accurate text rendering or real-world grounding via Google Search. It now supports up to 14 reference images for editing workflows and consistent character generation across up to 5 characters in a scene.

Both models gain Minimal and High thinking modes (letting the model reason through a complex prompt before rendering), expanded aspect ratios including 1:4 and 1:8 for banner and strip formats, and SynthID watermarking so AI-generated images carry an invisible provenance signal.

What to do before June 25

1. Search your codebase now. Look for any hardcoded references to -preview image model IDs. Check configuration files, environment variables, infrastructure-as-code, and any third-party integrations that accept a model ID as a parameter.

2. Update and test. Swap in the GA model IDs and run your existing test suite. Pay attention to any prompts that depend on specific output dimensions or aspect ratios, since the GA versions expand the available options.

3. If you use the Gemini Enterprise Agent Platform, your deadline is slightly later: Google recommends updating those endpoints before July 17, 2026. But there is no benefit to cutting it close.

4. Target completion by June 20 at the latest. That gives you a few days of production observation before the hard cutoff, rather than scrambling on the day.

A note on timeline

From the May 28 GA launch to the June 25 shutdown is roughly four weeks. That is the standard notice window Google applies to preview model deprecations (at least two weeks, per their policy). It is enough time to act, but not enough time to treat it as a background task.

If your image generation workload is customer-facing, prioritise this. A missed model ID in a single config file is all it takes to break a feature on June 25.

The Gemini deprecations page is worth bookmarking if you run production workloads on Gemini. It tracks current and upcoming shutdowns across the model family, and it is the fastest way to spot anything else in your stack that may need attention.