Replacement for imagen-4.0-generate-preview-06-06: what changes when you switch
The official replacement is gemini-nano-banana-2.1. imagen-4.0-generate-preview-06-06 shut down on 2026-02-17 per Google Gemini API's deprecation page (checked 2026-10-23). Price, context window, and max output were left blank because the official pages we checked did not publish them.
The Imagen page says Imagen models are shut down and to use Nano Banana. It says to call client.models.generate_content instead of client.models.generate_images. The image generation guide's text-to-image sample for gemini-nano-banana-2.1 uses client.interactions.create and POST https://generativelanguage.googleapis.com/v1beta/interactions. Neither page prints an error sentence, and neither shows a sample that only swaps the model id.
Do not put an Imagen model id or gemini-nano-banana-2.1 into generate_images. Use the call the Imagen page names, or the interactions sample on the image generation guide.
imagen-4.0-generate-preview-06-06 to gemini-nano-banana-2.1
Some values not published
Checked 2026-10-23.
Price per 1M tokens
Price comparison. Example monthly cost for 10M input tokens and 2M output tokens. Labeled example, not a bill.
Field
Old
New
Change
Input
Not published
$1.5
Not published
Output
Not published
$7.5
Not published
Cached input
Not published
Not published
Not published
Example monthly cost
Not published
$30
Example only
Context and max output
Token limits
Limit
Old
New
Change
Context window
Not published
131,072
Not published
Max output
Not published
32,768
Not published
Capabilities that differ
No differing capability values are published for both models.
Endpoint changes
The Imagen page says Imagen models are shut down and to use Nano Banana. It says to call client.models.generate_content instead of client.models.generate_images, and it names gemini-2.5-flash-image or gemini-3.1-flash-image. It does not show a sample that only swaps the model id. Source
The image generation guide's text-to-image sample for gemini-nano-banana-2.1 uses client.interactions.create and POST https://generativelanguage.googleapis.com/v1beta/interactions. That method is not the generate_content call named on the Imagen page, so this page does not show a before and after code swap. Source
Checklist
Read the shutdown date for imagen-4.0-generate-preview-06-06 on the linked official page.
Point your requests at gemini-nano-banana-2.1.
Re-check price, context, and parameters on the provider pages linked here.
Ship the change before the published shutdown date.
Questions
What is the replacement for imagen-4.0-generate-preview-06-06?
The official replacement is gemini-nano-banana-2.1. imagen-4.0-generate-preview-06-06 shut down on 2026-02-17 per Google Gemini API's deprecation page (checked 2026-10-23). Price, context window, and max output were left blank because the official pages we checked did not publish them.
Is gemini-nano-banana-2.1 cheaper than imagen-4.0-generate-preview-06-06?
A full price comparison is not published. One or both prices are missing from the official pages we checked.
Does gemini-nano-banana-2.1 have a bigger context window than imagen-4.0-generate-preview-06-06?
Context window sizes are not both published on the official pages we checked.