
Google is shutting down every Imagen 4 endpoint on August 17, 2026. The same shutdown hits all legacy Gemini 3 Image models. If your app calls generate_images(), it breaks on that date — not with a deprecation warning, but with a hard error. The migration path exists, but it is not a drop-in replacement. There are three breaking changes to handle before then.
What Is Going Away
The following model IDs stop working on August 17:
imagen-4.0-generate-001imagen-4.0-ultra-generate-001imagen-4.0-fast-generate-001- All legacy
gemini-3-imagevariants
The shutdown is on Google’s official deprecations page. You have 43 days from today. The replacement is the Gemini image model family — marketed internally as “Nano Banana” — with gemini-3.1-flash-image as the recommended migration target for most use cases.
Three Breaking Changes
This is not a model swap. The API shape changed. Here is what will break.
1. Method Name
client.models.generate_images() is gone. The replacement is client.models.generate_content(). Before:
response = client.models.generate_images(
model='imagen-4.0-generate-001',
prompt='Robot holding a red skateboard',
config=types.GenerateImagesConfig(number_of_images=4)
)
for img in response.generated_images:
img.image.show()
After:
response = client.models.generate_content(
model='gemini-3.1-flash-image',
contents='Robot holding a red skateboard'
)
for part in response.candidates[0].content.parts:
if part.inline_data:
with open("output.png", "wb") as f:
f.write(base64.b64decode(part.inline_data.data))
2. Response Object
The clean response.generated_images array is gone. Images now arrive as content parts inside response.candidates[0].content.parts. You check each part for inline_data to find the image. It is more verbose, and you need to handle the case where the model returns text alongside the image.
3. No More Batch Generation in One Call
The number_of_images parameter does not exist on Gemini image models. Each call produces one image. If you were generating four variants and letting users pick, you now need a loop. This is the change most likely to surprise production code.
The Pricing Trap
Imagen 4 had flat per-image pricing. Simple to budget: $0.02 fast, $0.04 standard, $0.06 ultra. Gemini image models use token-based pricing that scales with resolution.
| Model | Per Image (1K res) | Batch |
|---|---|---|
| Imagen 4 Fast (gone 8/17) | $0.020 | — |
| Imagen 4 Standard (gone 8/17) | $0.040 | — |
| Imagen 4 Ultra (gone 8/17) | $0.060 | — |
| Gemini 3.1 Flash Image | $0.067 | ~$0.034 |
| Gemini 3 Pro Image | $0.134 | ~$0.067 |
At standard resolution, Gemini 3.1 Flash Image costs 67% more than Imagen 4 Standard. That said, the Batch API brings it down to $0.034 — cheaper than Imagen 4 Standard. If you run any significant volume, switch to batch mode during migration. At 4K output, the cost jumps to $0.151 per image. Budget accordingly.
Other Gotchas
A few features from Imagen 4 do not carry over:
- Negative prompts are gone
- Image format control is gone — output is always PNG
- SynthID watermark is now mandatory and cannot be disabled
One issue worth flagging for teams with data residency requirements: there is an open thread on the Google Developers Forum about Gemini image model availability in Canada. If your app uses Canadian-hosted infrastructure, verify regional availability before August 17. This is not a hypothetical concern — at least one team has reported it as a blocker.
One more naming note: some Google documentation points to gemini-2.5-flash-image as a migration target. That model exists and works, but it is itself scheduled for eventual deprecation. The stable long-term target is gemini-3.1-flash-image.
What to Do This Week
- Search your codebase for
generate_imagesandimagen-4.0— find every call site - Replace with
generate_contentand update the response parsing - Audit any code using
number_of_images— replace with loops - Run the new calls in staging with your real prompts (safety filters differ between models)
- If you generate at volume, enable the Batch API — otherwise your costs jump 67%
August 17 is not a soft deadline. The full Imagen migration guide is on the Google AI docs site.













