SunsetDiff

models/gemini-2.5-flash is no longer available to new users

Some Gemini API keys get HTTP 404 on gemini-2.5-flash. Google's deprecations page says access to the 2.5 models is limited to users who have actively used them. It says the models are not deprecated.

Error text

models/gemini-2.5-flash is no longer available to new users

Quoted from GitHub issue LebgaaAbderrahmane/ecomAssistant#92, checked October 24, 2026.

The issue says Google answers 404 with that message for some API keys, and that older keys still work. The deprecations page says it is limiting access to the 2.5 models to users who have actively used them in the past. It says these models are not deprecated and will continue to be served until further notice through the API. For any new projects it names 3.5 Flash-Lite or 3.8 Flash. The model table on that page uses the ids gemini-3.5-flash-lite and gemini-3.8-flash. The deprecations page does not print the 404 sentence. The issue records the sentence for gemini-2.5-flash. The same access note sits above the gemini-2.5-pro section and the Gemini 2.5 Flash section, which also lists gemini-2.5-flash-lite with no shutdown date announced. A different sentence, recorded for gemini-2.0-flash after that model shut down, is on [This model is no longer available](/errors/gemini-model-no-longer-available/). Source: Gemini API deprecations, checked October 24, 2026.

Affected models

The quoted 404 fragment was recorded for gemini-2.5-flash. The other 2.5 ids are the stable models under the same access note. The issue does not record this sentence for them.
Model idWhat the source says
gemini-2.5-flash The GitHub issue records HTTP 404 with the sentence above for this id. The deprecations page lists release date June 17, 2025 and no shutdown date announced.
gemini-2.5-pro The 2.5 Pro section has the same access note. Release date June 17, 2025. No shutdown date announced. The issue does not record this 404 sentence for this id.
gemini-2.5-flash-lite Listed under Gemini 2.5 Flash models, under the same access note. Release date July 22, 2025. No shutdown date announced. The issue does not record this 404 sentence for this id.
gemini-3.8-flash The deprecations note names 3.8 Flash for new projects. The table id on that page is gemini-3.8-flash.
gemini-3.5-flash-lite The deprecations note names 3.5 Flash-Lite for new projects. The table id on that page is gemini-3.5-flash-lite.

Fix

Raw SDK

For a new project, call an id the deprecations note names for new projects. The sample uses gemini-3.8-flash. The issue says older keys can still call gemini-2.5-flash. This page does not say the model is shut down.

Before

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent" \
  -H "Content-Type: application/json" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -X POST \
  -d '{"contents":[{"parts":[{"text":"Hello"}]}]}'

After

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.8-flash:generateContent" \
  -H "Content-Type: application/json" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -X POST \
  -d '{"contents":[{"parts":[{"text":"Hello"}]}]}'

Source: Gemini API deprecations, checked October 24, 2026.

LiteLLM

LiteLLM's Gemini API route is the gemini/ prefix plus the model id. For a new project, use an id from the deprecations note.

Python

import litellm
response = litellm.completion(
    model="gemini/gemini-3.8-flash",
    messages=[{"role": "user", "content": "Hello"}],
)

Source: LiteLLM Gemini provider, checked October 24, 2026.

Vercel AI SDK

generateText takes the model id from google(). Use gemini-3.8-flash or gemini-3.5-flash-lite for a new project.

TypeScript

import { google } from "@ai-sdk/google";
import { generateText } from "ai";

const { text } = await generateText({
  model: google("gemini-3.8-flash"),
  prompt: "Hello",
});

Source: AI SDK generateText, checked October 24, 2026.

More request errors

All request errors

Questions

Does Google's deprecations page print this 404 sentence?

No. The page says 2.5 access is limited to users who have actively used those models, and that the models are not deprecated. The sentence in the Error text block is from GitHub issue LebgaaAbderrahmane/ecomAssistant#92, which records HTTP 404 for gemini-2.5-flash.

Why does an older key still work?

The issue says a key that counts as a new user gets the 404, and older keys still call gemini-2.5-flash. The deprecations page says the models are still served for users who have actively used them.

Which ids does the deprecations page name for a new project?

The note says 3.5 Flash-Lite or 3.8 Flash. The table on that page uses gemini-3.5-flash-lite and gemini-3.8-flash. gemini-2.5-flash, gemini-2.5-pro, and gemini-2.5-flash-lite have no shutdown date announced.

Deprecation alerts

We email you before models shut down. Unsubscribe anytime.

Deprecation alert signup
Providers (optional)