cd /news/artificial-intelligence/firebase-imagen-shutdown-migrate-to-… · home topics artificial-intelligence article
[ARTICLE · art-37309] src=byteiota.com ↗ pub= topic=artificial-intelligence verified=true sentiment=↓ negative

Firebase Imagen Shutdown: Migrate to Gemini Image Models Now

Firebase shut down its Imagen image generation models on June 24, 2026, causing 404 errors for apps still using the old API. Developers must migrate to the Gemini Image model family, which requires changes to the model class, configuration, method call, and response handling. Firebase recommends using Remote Config to avoid hardcoding model names and ensure future transitions are seamless.

read3 min views9 publishedJun 24, 2026
Firebase Imagen Shutdown: Migrate to Gemini Image Models Now
Image: Byteiota (auto-discovered)

Firebase’s Imagen image generation models went offline today. Any app still calling ImagenModel

with an Imagen model name is now receiving 404 errors from Google’s API. This is not a soft deprecation — it’s a hard cut. The replacement is the Gemini Image model family, specifically gemini-3.1-flash-image

, which Google has been shipping under the internal name “Nano Banana 2.” The migration is not a one-line swap. The API class, configuration object, method call, and response handling all change.

What Is Shutting Down #

All Imagen models across both the Gemini Developer API and Vertex AI Gemini API are terminated as of June 24, 2026. That includes the generation models (imagen-3.0-generate-001

, imagen-3.0-fast-generate-001

) and the editing capability model (imagen-3.0-capability-001

). If your mobile or web app uses Firebase AI Logic and calls any of these, it is broken right now.

Affected platforms: Android (Kotlin/Java), iOS (Swift), Web (JavaScript), Flutter (Dart), and Unity (C#). If your app generates images and uses Firebase, assume you are affected until you verify otherwise.

The Four Changes Required #

The migration from Imagen to Gemini Image involves four distinct API changes. Before diving in, make sure your Firebase AI Logic SDK is at the early May 2026 release or newer — older versions do not expose imageConfig

support.

Replace the model class.ImagenModel

is gone. You now useGenerativeModel

, the same class used for text generation. Get it viagetGenerativeModel()

instead ofgetImagenModel()

.Replace the configuration object.ImagenGenerationConfig

is replaced byGenerationConfig

with a nestedimageConfig

block. The aspect ratio and image size options move there.Replace the method call.generateImages()

is replaced bygenerateContent()

.Update response handling. Imagen returned animages[]

array. Gemini Image returns a multimodal response with mixed parts — your code needs to find the part whereinlineData

exists.

Here is what the JavaScript migration looks like:

// BEFORE — returns 404 starting today
const imagenModel = getImagenModel(ai, { model: "imagen-3.0-generate-001" });
const result = await imagenModel.generateImages({
  prompt: "a mountain lake at dusk",
  aspectRatio: ImagenAspectRatio.LANDSCAPE_16x9,
});
const imageData = result.images[0].bytesBase64Encoded;

// AFTER — works now
const model = getGenerativeModel(ai, {
  model: "gemini-3.1-flash-image",
  generationConfig: {
    responseModalities: ["TEXT", "IMAGE"],
  }
});
const result = await model.generateContent("a mountain lake at dusk");
const imagePart = result.response.candidates[0].content.parts
  .find(p => p.inlineData);
const imageData = imagePart.inlineData.data;

The Multimodal Gotcha #

Gemini Image models do not generate images in isolation. They always produce text alongside images — this is a fundamental design difference from Imagen. If you set responseModalities: ["IMAGE"]

without including "TEXT"

, the entire response fails. You must include both. Your app will receive a text part and an image part in every response. The text is usually a brief description or caption; you can ignore it, but you cannot make it disappear.

Use Firebase Remote Config for the Model Name #

Firebase explicitly recommends against hardcoding model names — and today is a clear illustration of why. Mobile apps cannot force users to update immediately. If you hardcoded imagen-3.0-generate-001

, your app is broken for every user on an older version. Firebase Remote Config lets you switch the model name server-side without a new app release. Set this up now, before the next transition.

The pattern is straightforward: store the model name as a Remote Config parameter, fetch it at app startup, and pass it to getGenerativeModel()

. Firebase’s Remote Config integration guide for AI Logic walks through the full implementation.

Why Google Made This Change #

Google is consolidating its AI product lines under the Gemini brand. Imagen was developed by a separate team with a different architecture; Gemini Image models now surpass it on generation speed, cost, and prompt understanding. Nano Banana 2 (gemini-3.1-flash-image

) generates images roughly 50 percent faster than the original Nano Banana Pro at a lower per-image cost.

The Imagen firebase shutdown is not the last consolidation you will see from Google. Other specialized APIs in the Google AI ecosystem are likely to follow the same path into Gemini. If you are building on Firebase, get comfortable with the Gemini model family and make Remote Config part of your standard AI integration setup. The Gemini image generation reference has full platform-specific examples for Android, iOS, Flutter, and Web.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @firebase 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/firebase-imagen-shut…] indexed:0 read:3min 2026-06-24 ·