Gemini API Image Generation 2026: Fix Failed to Fetch After Preview Shutdowns
Gemini API image generation changed in 2026: preview image models now fail after the June 25 cutoff, and Imagen 4 GA endpoints shut down August 17. Audit model IDs, swap to gemini-3.1-flash-image or gemini-3-pro-image, and test generateContent before the next incident.

Two Gemini image API shutdown deadlines are now in play simultaneously. The first is five days away. If your pipeline still calls a preview image model ID, you have until June 25 before it stops responding. The second — affecting Imagen 4 GA endpoints — gives you until August 17 to complete migration. Both waves require a routing decision today, not during an on-call incident.
What happened
Google's official Gemini API changelog lists two deprecation announcements from May and June 2026 that affect image generation model IDs:
Wave 1 — June 25, 2026 (urgent):
gemini-3.1-flash-image-preview— shut downgemini-3-pro-image-preview— shut down
These were deprecated on May 28, 2026 when Google released the generally available replacements: gemini-3.1-flash-image (Nano Banana 2) and gemini-3-pro-image (Nano Banana Pro). Preview IDs get a minimum two-week window; June 25 is the hard cutoff.
Wave 2 — August 17, 2026 (planning window):
imagen-4.0-generate-001imagen-4.0-ultra-generate-001imagen-4.0-fast-generate-001
These are the Imagen 4 GA endpoints announced deprecated on June 15, 2026. Migration paths for this wave are not yet published in full, but the official Gemini deprecations page will carry updated guidance. Teams using Imagen 4 endpoints have roughly eight weeks.
Why it matters for AI engineering teams
Image generation is increasingly embedded in production AI pipelines — multimodal agents that produce thumbnails, brand assets, report infographics, or UI mockups. The deprecation pattern here has two properties that make it riskier than a typical model sunset:
Two waves, two different response codes. Once a preview model ID shuts down on June 25, API calls return an error response — not a graceful degradation. Teams running the preview string in configuration rather than the GA string will see hard failures, not quality regressions. This is different from a soft deprecation where the model just gets redirected.
The Imagen 4 situation is different. Imagen 4 (imagen-4.0-*) endpoints are GA models being replaced. This is not a preview-to-GA upgrade path; it is a GA-to-next-generation transition. The replacement candidates from the current Gemini image lineup are the same GA models that replaced the preview wave: gemini-3.1-flash-image and gemini-3-pro-image. The capability overlap between Imagen 4 and these native Gemini models is significant — both support text rendering and video-to-image generation on the Flash Image model — but the API contract differs: Imagen 4 uses the imageGeneration capability path whereas the Gemini 3.x image models use the standard generateContent API.
Routing configuration needs two separate updates. A team that fixes Wave 1 today by switching from preview IDs to GA IDs has not addressed Wave 2. August 17 requires a second pass.
The router/operator angle
If you route image generation requests through a proxy or gateway, the deprecation creates a model-ID audit problem at the routing layer, not just the application layer:
Audit your model ID allowlist. Any routing table, model alias, or fallback chain that references gemini-3.1-flash-image-preview, gemini-3-pro-image-preview, or any imagen-4.0-* variant needs to be updated in two passes. The preview IDs should be retired before June 25; the Imagen 4 IDs before August 17.
The June 25 wave also hits Firebase AI Logic. Firebase's AI Logic SDK was routing to Imagen models that are being retired — the Firebase docs explicitly note that all Imagen models under that SDK are deprecated with a June 24 shutdown date. Teams using Firebase for image generation in mobile or web apps need to migrate to the Gemini image SDK path instead.
Model parity between Wave 1 replacements and Wave 2. The GA Gemini image models that replace the preview wave (gemini-3.1-flash-image, gemini-3-pro-image) are also the migration targets for part of the Imagen 4 wave. This means your routing policy can consolidate rather than expand: you are converging on fewer, better-supported model IDs, not fragmenting into more providers.
API surface mismatch on generateContent vs Imagen endpoint. If your existing pipeline was built against the Imagen 4 endpoint format, migrating to gemini-3-pro-image requires an API call format change, not just a model ID swap. Plan for a brief integration test cycle before August 17.
What TheRouter users should watch or try
If you are routing image generation calls through TheRouter, check your configured model IDs against both shutdown dates. The routing policy change is straightforward: replace preview model ID strings and track the August 17 deadline for Imagen 4 endpoints in your deprecation calendar.
For teams building multi-provider image routing — for example, routing between Gemini image models and DashScope's wan2.7-image-pro depending on content type or cost — the June 25 cutover is a good trigger point to validate your fallback configuration. Any fallback chain that names a preview model ID as a secondary option will fail silently after June 25 if the primary model is unavailable.
We previously covered the Vertex AI Imagen and Veo endpoint deprecations (June 30 shutdown) on the Vertex AI side. The Gemini API deprecations in this article are a separate system with different model IDs, different endpoint paths, and different shutdown dates. Both need attention.
Decision checklist for operators
Before June 25:
- Search your codebase, config files, and routing tables for
gemini-3.1-flash-image-previewandgemini-3-pro-image-preview - Replace with
gemini-3.1-flash-image(Flash tier) orgemini-3-pro-image(Pro tier) respectively - Re-run integration tests; the GA API contract is stable but worth confirming in your specific environment
Before August 17:
- Audit all
imagen-4.0-generate-001,imagen-4.0-ultra-generate-001, andimagen-4.0-fast-generate-001references - Identify the target migration path —
gemini-3.1-flash-imagecovers most Imagen 4 use cases including text rendering and video-to-image - Account for the API format change if your pipeline used the Imagen-specific endpoint shape
- Monitor the Gemini deprecations page for the official migration guide when it publishes
The two-wave structure here is not unusual for a maturing multimodal API, but the simultaneity of a five-day deadline and an eight-week planning window makes this a prioritization decision, not just a migration task.

Nano Banana 2 Lite Is Your New Default Gemini Image Endpoint — Here's the Routing Decision Framework
Google's Nano Banana 2 Lite (gemini-3.1-flash-lite-image) landed June 30 at $0.034/1K images and 4-second latency. If you are still routing to gemini-2.5-flash-image, you are on a legacy model. Here is the three-tier routing framework every image pipeline team needs.

Gemini Provisioned Throughput Now Queues 7 Orders: What the Multiple Pending Orders GA Means for Routing Teams
Google made multiple pending Provisioned Throughput orders generally available on July 1 — you can now queue up to seven orders per model and region simultaneously, removing the one-at-a-time bottleneck that forced sequential 10-day activation waits.

Gemini Non-Global Endpoint Pricing Goes Live July 1: The 10% Regional Premium Every Routing Team Must Account For
Starting July 1, 2026, Google's Gemini 3 and later models charge a 10% premium on non-global (regional) endpoints. Teams routing to eu-west1, asia-northeast1, or other non-global locations must audit their cost models today.