Okapi Okapi

Gemini API · Model retirement

imagen-4.0-generate-001

Stopped working

Calls to the model imagen-4.0-generate-001 on Gemini API stopped working on August 17, 2026.

What to use instead of imagen-4.0-generate-001

Move to gemini-nano-banana-2.1, recommended by Google.

Nano Banana is called with generate_content (generateContent), not generate_images, and returns the image as a content part holding the image data instead of Imagen's generated-images response object.

Facts

API
Gemini API generativelanguage.googleapis.com
Model
imagen-4.0-generate-001
Kind
Model retirement
Takes effect
August 17, 2026
Calls after that day
Fail
Source
Deprecations page
Last updated

More from Gemini API

Know before your API calls break.

Okapi finds the calls a breaking change hits in your code and opens the pull request that fixes them.

Add to GitHub