Imagen 4 endpoints shut down on 17 August 2026: and the migration is more than a model rename
Imagen 4 model endpoints hard-shut-down 17 August 2026. Migration means switching method, model name, and response parsing.
If your application uses the Gemini API to generate images, you have a hard deadline on your calendar: 17 August 2026. On that date, Google will completely switch off the Imagen 4 model endpoints. No warning, no graceful degradation. The API calls will simply fail.
What makes this more than a routine model retirement is that the replacement is not a drop-in swap. The API shape changed. If you update the model name but leave the method call alone, your code will still break.
What is being shut down
The following model IDs were deprecated on 15 June 2026 and will be hard-shut-down on 17 August 2026:
imagen-4.0-generate-001imagen-4.0-ultra-generate-001imagen-4.0-fast-generate-001
Any legacy Gemini 3 image model IDs routed through the same endpoint paths are caught by this retirement as well. The shutdown applies to both the Gemini Developer API and the Agent Platform Gemini API (formerly Vertex AI), so there is no side route to avoid it.
That gives developers roughly eleven weeks from when the replacement models reached general availability (28 May 2026) to complete migration. It is not a generous window.
The replacement models
Google’s recommended migration target is gemini-3.1-flash-image, part of what the team internally refers to as the “Nano Banana” model family. For higher-quality output, gemini-3-pro-image is the alternative. Both reached GA on 28 May 2026.
A note worth keeping in mind: some Google documentation points to gemini-2.5-flash-image as a migration target. That model exists and works, but it is itself on a deprecation track. If you are doing the work anyway, migrate to gemini-3.1-flash-image and avoid revisiting this in a few months.
Three things that actually need to change in your code
This is where most teams will trip up. The migration is not just updating a string constant. There are three distinct breaking changes.
1. The method name changes
The old endpoint used client.models.generate_images(). The new endpoint uses client.models.generate_content(). Search your codebase for every call to generate_images and replace it.
2. The response structure changes
The old generate_images() call returned a structured image response object. Your code likely accesses it via response.generated_images. The new generate_content() call returns content parts, which may include image data alongside text or other content. The response.generated_images pattern no longer exists, so any response-parsing logic needs rewriting too.
3. The number_of_images parameter changes
The old API accepted a number_of_images parameter inside GenerateImagesConfig. The new API does not work this way. If you need multiple images, you will need to loop over separate generate_content() calls rather than passing a count.
A practical first step: run a search across your repositories for generate_images, imagen-4.0, GenerateImagesConfig, and number_of_images. Each hit is a call site that needs attention before the 17 August deadline.
What this means for you
If you are running image generation in production, the priority is straightforward: audit, update, and test in staging before August.
A few things worth factoring into your planning:
Cost. The new gemini-3.1-flash-image model uses token-based pricing that scales with resolution. At standard resolution it costs roughly 67% more per image than Imagen 4 Standard did. However, the Batch API brings the cost down to around $0.034 per image, which is cheaper than Imagen 4 Standard. If you are running high-volume generation, switching to batch mode during migration is worth the extra setup time.
Safety filters. The new models apply different safety filters than the Imagen 4 models. Run your real production prompts in staging, not just synthetic test cases. You may find that prompts which previously worked cleanly now behave differently, or vice versa.
Regional availability. There is an open thread on the Google Developers Forum about Gemini image model availability in Canada. If your infrastructure is Canadian-hosted, verify regional support before committing to a migration timeline.
New capabilities. Once you are on gemini-3.1-flash-image, you gain access to video-to-image generation. You can pass a video file (via direct upload or a public YouTube URL) as multimodal context to generate thumbnails, cinematic posters, or summary infographics. This capability is exclusive to the new model family and is not available on the Imagen 4 endpoints being retired.
Getting the migration done
The official Imagen migration guide on the Google AI for Developers site is the primary reference. The Gemini deprecations page has the confirmed shutdown dates in tabular form if you need to reference them for internal planning documents.
The core checklist:
- Search for every call to
generate_imagesandimagen-4.0in your codebase - Replace
client.models.generate_imageswithclient.models.generate_content - Update model names to
gemini-3.1-flash-image(orgemini-3-pro-imagefor higher quality) - Rewrite response parsing from
response.generated_imagesto handle content parts - Replace
number_of_imagesparameters with loops - Test with real production prompts in staging, paying attention to safety filter behaviour
- If you are high-volume, evaluate the Batch API to manage cost
The 17 August 2026 deadline is firm. Given that the replacement models only became generally available in late May 2026, eleven weeks is tight for teams with significant image generation workloads. Starting the audit now is the sensible move.