Imagen 4 API Shutdown: How to Migrate Your Image Generation
Google scheduled all three generally available Imagen 4 Gemini API model IDs to shut down on August 17, 2026. If your application still references imagen-4.0-generate-001, imagen-4.0-ultra-generate-001, imagen-4.0-fast-generate-001, migrate the integration to a currently supported Gemini image model and test request and response behavior before routing production traffic.
Move remaining traffic to a currently supported Gemini image endpoint
Migration urgency
Immediate for any integration that still names an Imagen 4 ID
Google's deprecations page, last updated 2026-09-15 UTC, still lists August 17, 2026 as the shutdown date for those three GA IDs. Preview Imagen 4 IDs imagen-4.0-generate-preview-06-06 and imagen-4.0-ultra-generate-preview-06-06 had earlier shutdown dates and are a different cutover.
Which Imagen 4 model IDs were shut down?
The June 15, 2026 changelog named these generally available Imagen 4 Gemini API IDs:
imagen-4.0-generate-001
imagen-4.0-ultra-generate-001
imagen-4.0-fast-generate-001
Do not treat older preview IDs, Imagen 3 IDs, or Gemini native image preview IDs as part of this same list. Those families carry their own dates on the deprecations table.
What replaces Imagen 4?
There is no single drop-in rename. Google's surfaces still disagree on how narrowly they describe the successor, so this page separates the shutdown fact from the current replacement choices.
The Gemini deprecations table names gemini-3.1-flash-image as the recommended replacement for all three GA Imagen 4 IDs.
The current image-generation documentation (updated 2026-09-04) centers the Nano Banana family and says Imagen models are deprecated and shut down on August 17, 2026. It describes Nano Banana 2 as the versatile general-purpose image model and Nano Banana 2 Lite as the fastest and cheapest option.
The Gemini pricing page checked on 2026-09-15 no longer lists Imagen 4 prices or an Imagen 4 shutdown warning. It publishes token-based Nano Banana rates and separately warns that gemini-2.5-flash-image shuts down on October 2, 2026.
Use the current IDs below as a menu, not as a promise that every Imagen 4 job maps to one of them without code or quality changes:
Current Gemini image model IDs
Google name
Current Gemini API ID
How Google positions it
Nano Banana 2 Lite
gemini-3.1-flash-lite-image
Fastest / lowest published Gemini image cost
Nano Banana 2
gemini-3.1-flash-image
Google's general-purpose Gemini image workhorse
Nano Banana Pro
gemini-3-pro-image
Premium / complex Gemini image model
Nano Banana (legacy)
gemini-2.5-flash-image
Legacy Gemini image model, separately deprecated
Prefer gemini-3.1-flash-image when you want the ID Google currently lists as the Imagen 4 replacement. Choose Lite when latency and cost dominate and the job does not need multi-reference editing. Choose Pro when the live docs for that job still call for the premium Gemini image model. Do not treat legacy gemini-2.5-flash-image as a durable Imagen 4 successor — Google already dates its own shutdown.
Imagen 4 to Gemini image migration checklist
Search application code, infrastructure, and model-fallback lists for all three GA Imagen 4 IDs.
Map each retired ID to the workloads that still depend on it (generation, editing, batch, or fallback).
Choose a currently supported Gemini image model from live Google docs, not from a stale blog post.
Update the request surface — Interactions or generateContent — instead of swapping only the model string.
Retest prompt fidelity, aspect ratio, and output dimensions on a production-like sample.
Retest image-editing and reference-image flows as their own suite. Do not assume text-to-image success covers them.
Validate error handling, quotas, and rate-limit behavior on the new endpoint.
Compare cost on the same production mix. Gemini image models are token-priced; Imagen 4 rates are no longer published.
Run side-by-side visual QA before shifting traffic.
Cut over production, then monitor failures, latency, and spend. Remove retired IDs from every fallback path.
Code migration examples
These Gemini examples follow the current image-generation documentation. They are example targets, not guaranteed one-for-one replacements for every Imagen workload. Confirm the SDK version and field names against Google's live docs before you ship.
Python
from google import genai
import base64
client = genai.Client()
interaction = client.interactions.create(
model="gemini-3.1-flash-image",
input="Create a picture of a nano banana dish in a fancy restaurant with a Gemini theme",
)
with open("generated_image.png", "wb") as f:
f.write(base64.b64decode(interaction.output_image.data))
JavaScript
import { GoogleGenAI } from "@google/genai";
import * as fs from "node:fs";
const ai = new GoogleGenAI({});
const interaction = await ai.interactions.create({
model: "gemini-3.1-flash-image",
input:
"Create a picture of a nano banana dish in a fancy restaurant with a Gemini theme",
});
if (interaction.output_image) {
const buffer = Buffer.from(interaction.output_image.data, "base64");
fs.writeFileSync("gemini-native-image.png", buffer);
}
REST
curl -s -X POST \
"https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-flash-image",
"input": [
{
"type": "text",
"text": "Create a picture of a nano banana dish in a fancy restaurant with a Gemini theme"
}
]
}'
OfflineCreator Studio CLI
Studio is not a Gemini API proxy and does not accept imagen-4.* or gemini-*-image IDs. If you want hosted generation through Studio's catalog instead of Google's Gemini API, the published CLI starts a generation with a Studio model ID:
npx @offlinecreator/mcp generate \
--model nano-banana-2-lite \
--prompt "A still life of citrus on dark slate, studio lighting" \
--aspect 1:1
That command uses the Studio ID nano-banana-2-lite, which maps to the managed endpoint google/nano-banana-2-lite and currently quotes 6 credits at the catalog default. It is not a drop-in Gemini Interactions call. See the CLI generate-image guide and the Studio model identifier page.
Imagen 4 vs current Gemini image models
Values below were checked against Google's public docs on 2026-09-15. Pricing cells use Google's published paid-tier 1K image equivalents where Google states them. Imagen 4 prices are omitted because they are no longer on the current pricing page.
Imagen 4 versus current Gemini image models
Capability
Imagen 4 legacy
Nano Banana 2 Lite
Nano Banana 2
Nano Banana Pro
Current Gemini API availability
Shut down August 17, 2026
Listed as live
Listed as live; deprecations-table replacement
Listed as live
Gemini API ID
imagen-4.0-generate-001
imagen-4.0-ultra-generate-001
imagen-4.0-fast-generate-001
gemini-3.1-flash-lite-image
gemini-3.1-flash-image
gemini-3-pro-image
Positioning
Retired dedicated Imagen generation
Speed and cost
General-purpose workhorse
Premium / complex visual tasks
Editing / references
Do not assume parity
Not optimized for multi-reference or multi-turn edit
Documented for multiple reference images
Documented for complex control; up to 4K
Current Google 1K image equivalent
Not published on the current pricing page
$0.0336 paid / 1K image (token equivalent)
$0.067 paid / 1K image (token equivalent)
$0.134 paid / 1K or 2K image (token equivalent)
Studio launch catalog
Not present
Yes · nano-banana-2-lite · 6 credits at default
No Studio ID for gemini-3.1-flash-image
Yes · nano-banana-pro · 18 credits at default
Migration mistakes to avoid
Changing only the model ID
Imagen used a dedicated generate-images surface. Current Gemini image examples use the Interactions API with models such as gemini-3.1-flash-image. A string replace leaves request fields, response parsing, and config untested.
Assuming identical output behavior
Prompt adherence, text rendering, people filters, and aspect-ratio handling are not guaranteed to match retired Imagen 4 results. Compare samples, not marketing labels.
Ignoring quotas and rate limits
A new model ID inherits that model's current limits, not the limits you remember from Imagen 4. Confirm them against live Google quota documentation for the replacement you choose.
Comparing per-image and token economics as if they were the same unit
Current Nano Banana rates are published as token prices with approximate per-image equivalents at named resolutions. Thinking tokens, grounding searches, and retries can move the real job cost.
Skipping editing and reference-image retests
Google's image docs warn that Nano Banana 2 Lite is not optimized for multiple reference inputs or multi-turn sequential editing. Those flows need their own pass.
Leaving retired IDs in fallback configuration
A hidden retry or environment default that still names imagen-4.0-*-001 will fail after shutdown even if the primary path looks migrated.
Trusting stale migration articles over current Google docs
Replacement wording has already drifted across Google surfaces. Re-read the deprecations table, image-generation guide, and pricing page on the day you cut over.
Reduce future model-ID churn in application code
Hard-coding one vendor image ID is what made this shutdown expensive. OfflineCreator Studio is a hosted credit catalog with web, MCP, CLI, and REST surfaces over modelId values from the current Studio catalog. It does not claim to route Imagen 4, Nano Banana 2 (gemini-3.1-flash-image), or arbitrary Gemini image IDs.
What this repository does verify today: the launch catalog includes Nano Banana 2 Lite (nano-banana-2-lite → google/nano-banana-2-lite) and Nano Banana Pro (nano-banana-pro → fal-ai/nano-banana-pro). Those jobs run through Studio's managed fal path. Credit quotes come from published Studio pricing, not from Google's token card.
If you still need Google's Gemini API contract — Interactions, grounding, or an ID Studio does not catalog — keep that integration on Google and use this page as the migration checklist. If you want a hosted catalog plus MCP/CLI instead of another provider-specific client, start at the AI image generator, compare models on AI models, or read API vs MCP vs CLI and migrate a provider script to Studio REST.
Teams whose actual goal is to stop using hosted image APIs can look at LocalForge on offlinecreator.com. That is a local/offline product, not a Studio Imagen 4 shim, and it is not this page's primary path.
Yes. Google's June 15, 2026 Gemini API release notes announced deprecation for the three generally available Imagen 4 Gemini API IDs, with shutdown on August 17, 2026.
When did the Imagen 4 API shut down?
Google's changelog and deprecations table list August 17, 2026 as the shutdown date for imagen-4.0-generate-001, imagen-4.0-ultra-generate-001, and imagen-4.0-fast-generate-001. After that date those endpoints are no longer available.
Which Imagen 4 model IDs were affected?
The GA IDs are imagen-4.0-generate-001, imagen-4.0-ultra-generate-001, and imagen-4.0-fast-generate-001. Preview IDs such as imagen-4.0-generate-preview-06-06 had earlier shutdown dates and should not be mixed into this cutover.
What replaces imagen-4.0-generate-001?
Google's current Gemini deprecations table names gemini-3.1-flash-image as the recommended replacement for all three GA Imagen 4 IDs. Google's image-generation docs separately describe a Nano Banana family, with gemini-3.1-flash-image as the general-purpose workhorse. Choose by current supported endpoint, capability, and cost — not by renaming the old string.
Is Nano Banana 2 the replacement for Imagen 4?
It is the replacement Google's deprecations table currently names (gemini-3.1-flash-image). It is not a guaranteed one-for-one successor for every Imagen workload. Image-generation docs also list Lite, Pro, and a legacy Gemini 2.5 Flash Image model with different cost, editing, and deprecation timelines.
Can I keep using Imagen 4 after August 17, 2026?
Not on the Gemini API IDs Google scheduled to shut down. Those endpoints are turned off after the shutdown date. Remaining traffic must use a currently supported image model.
Do I only need to change the model ID?
Usually no. Imagen used a dedicated image-generation surface. Current Gemini image docs show Interactions API calls to models such as gemini-3.1-flash-image. Prompt behavior, image config, editing, reference images, quotas, and billing can all differ.
How should I compare Imagen 4 and Nano Banana pricing?
Do not reuse historical Imagen per-image prices as current rates. As of 2026-09-15, Google's Gemini pricing page no longer lists Imagen 4 and instead publishes token-based Nano Banana image rates. Compare a real production workload — resolution, thinking tokens, grounding, and retries — rather than a single sticker price.
What should I test before moving image generation to a new model?
Retest prompt fidelity, aspect ratio and resolution, editing and reference-image flows, error handling, quotas, and cost on a sample of production jobs. Keep retired Imagen IDs out of fallback configuration.
Does OfflineCreator Studio accept Imagen 4 or Gemini image model IDs?
No. Studio's launch catalog does not include imagen-4.* or gemini-*-image IDs. It does include two Nano Banana variants under Studio IDs nano-banana-2-lite and nano-banana-pro, served through managed fal endpoints. That is a different contract from the Gemini API.