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. 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 https://firebase.google.com/docs/ai-logic/models 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 https://firebase.google.com/docs/ai-logic/imagen-models-migration 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 use GenerativeModel , the same class used for text generation. Get it via getGenerativeModel instead of getImagenModel . Replace the configuration object. ImagenGenerationConfig is replaced by GenerationConfig with a nested imageConfig block. The aspect ratio and image size options move there. Replace the method call. generateImages is replaced by generateContent . Update response handling. Imagen returned an images array. Gemini Image returns a multimodal response with mixed parts — your code needs to find the part where inlineData exists. Here is what the JavaScript migration looks like: js // 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 https://firebase.google.com/docs/ai-logic/solutions/remote-config 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 https://firebase.google.com/docs/ai-logic/generate-images-gemini has full platform-specific examples for Android, iOS, Flutter, and Web.