SunsetDiff

Replacement for gemini-2.5-flash-image: what changes when you switch

The official replacement is gemini-3.1-flash-lite-image. gemini-2.5-flash-image shuts down on 2027-03-15 per Google Vertex AI's deprecation page (checked 2026-10-17). On the labeled example of 10 million input tokens and 2 million output tokens, gemini-3.1-flash-lite-image costs $5.5 a month, lower than $8 for gemini-2.5-flash-image.

This is the canonical diff. Model page · Replacement page · Google Vertex AI

gemini-2.5-flash-image to gemini-3.1-flash-lite-image

All values from official sources Checked 2026-10-17.

Price per 1M tokens

Price comparison. Example monthly cost for 10M input tokens and 2M output tokens. Labeled example, not a bill.
FieldOldNewChange
Input $0.3 $0.25 -16.7% (lower)
Output $2.5 $1.5 -40% (lower)
Cached input Not published Not published Not published
Example monthly cost $8 $5.5 Example only

Context and max output

Token limits
LimitOldNewChange
Context window 32,768 65,536 +100% (higher)
Max output 32,768 4,096 -87.5% (lower)

Capabilities that differ

No differing capability values are published for both models.

API changes

No parameter change is listed on the official pages we checked. The sample below only swaps the model id.

Code

python before
from google import genai
client = genai.Client()
response = client.models.generate_content(
    model="gemini-2.5-flash-image",
    contents="Hello",
)
python after
from google import genai
client = genai.Client()
response = client.models.generate_content(
    model="gemini-3.1-flash-lite-image",
    contents="Hello",
)
typescript before
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const response = await ai.models.generateContent({
  model: "gemini-2.5-flash-image",
  contents: "Hello",
});
typescript after
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const response = await ai.models.generateContent({
  model: "gemini-3.1-flash-lite-image",
  contents: "Hello",
});
curl before
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"parts":[{"text":"Hello"}]}]}'
curl after
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-flash-lite-image:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"parts":[{"text":"Hello"}]}]}'

Checklist

  1. Read the shutdown date for gemini-2.5-flash-image on the linked official page.
  2. Point your requests at gemini-3.1-flash-lite-image.
  3. Re-check price, context, and parameters on the provider pages linked here.
  4. Ship the change before the published shutdown date.

Questions

What is the replacement for gemini-2.5-flash-image?

The official replacement is gemini-3.1-flash-lite-image. gemini-2.5-flash-image shuts down on 2027-03-15 per Google Vertex AI's deprecation page (checked 2026-10-17). On the labeled example of 10 million input tokens and 2 million output tokens, gemini-3.1-flash-lite-image costs $5.5 a month, lower than $8 for gemini-2.5-flash-image.

Is gemini-3.1-flash-lite-image cheaper than gemini-2.5-flash-image?

Yes. The labeled example monthly cost is $8 for the old model and $5.5 for the replacement.

Does gemini-3.1-flash-lite-image have a bigger context window than gemini-2.5-flash-image?

Yes. The context window changes from 32,768 to 65,536 tokens.