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.
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.
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.
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.
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.
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.
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.