Gemini 2.5 Flash and 2.5 Pro return 404 NOT_FOUND in the Gemini API: why and what to use instead

Last verified: November 7, 2026
Developers who call Gemini 2.5 Flash or Gemini 2.5 Pro from a new or recently created project keep running into the same confusing failure: the API key works, the model appears when they list the available models, and yet every request to generate an answer comes back as a 404 "not found" error. The model has not disappeared and the key is not broken. Google now serves the 2.5 models only to projects that already used them, so the fix is to switch the request to a current model, which Google names as Gemini 3.8 Flash or Gemini 3.5 Flash-Lite.
The restriction applies to the Gemini Developer API, the API reached with a key from Google AI Studio, and Google added it to the Gemini API release notes on September 18, 2026. Since then the official developer forum has collected a steady stream of threads with the same symptom, including paid Tier 1 accounts, and Google staff have answered them with the same explanation as recently as November 2. The situation changes again on December 1, 2026, when Google starts routing requests for 2.5 Flash and 2.5 Pro to newer models.
··········
THE GEMINI 2.5 FLASH 404 ERROR: WHAT DEVELOPERS SEE.
The failure shows up on the generateContent call, the endpoint that actually produces text. The checks a developer normally runs first all pass: the key authenticates, the Generative Language API is enabled in the Google Cloud project, and a metadata request for `models/gemini-2.5-flash` returns HTTP 200 with generateContent listed among the supported methods. One forum poster also tried the stable `v1` endpoint after `v1beta` failed and got the same 404, so changing the API version is not a fix.
The exact wording depends on the client library and on when the request was made. These are the forms reported on the Google AI Developers Forum.
........
What the developer sees | Where it was reported | When |
HTTP 404 with status NOT_FOUND and no error reason | Raw REST calls and the google-genai Python SDK | August to November 2026 |
This model models/gemini-2.5-flash is no longer available to new users. | API response quoted on the forum | September 2026 |
Gemini 2.5 Pro returns "no longer available to new users" | Forum thread with about 2,900 views | August 2026 |
Gemini 2.5 Pro missing from the model picker in Google AI Studio | Forum threads with 600 to 900 views each | September to October 2026 |
........
The pattern in all of them is the same: discovery calls succeed, generation calls fail, and only the 2.5 models are affected. The same key sends requests to Gemini 3.8 Flash without any problem.
··········
WHY GEMINI 2.5 FLASH IS LISTED BUT RETURNS 404.
The model page for Gemini 2.5 Flash, last updated on October 29, 2026, carries the explanation in Google's own words: "we are limiting access to the 2.5 models to users who have actively used them in the past." The same notice says the models "are not deprecated and will continue to be served until further notice through the API", and it tells new projects to use "3.5 Flash-Lite or 3.8 Flash". The deprecations page repeats the notice and still lists gemini-2.5-pro, gemini-2.5-flash and gemini-2.5-flash-lite with "No shutdown date announced".
Google staff added one detail on the forum on November 2: access is limited "to projects that have actively used them". Eligibility is therefore tied to the Google Cloud project behind the key, not to the Google account or the person. The models list does not check this eligibility, which is why the model appears as available to a project that cannot call it. Google has not explained that behavior in its documentation; it is what the affected developers report on the forum.
The table below covers the situations that produce the error and how to tell them apart.
........
Cause | How to check | Fix |
The project never called a 2.5 model before the restriction | The project or key was created recently, or usage reports show no 2.5 traffic | Change the model string to gemini-3.8-flash or gemini-3.5-flash-lite |
The app is old but the key belongs to a new or separate project | Compare the project ID of the failing key with the project that served the app before | Move the call to the old project's key, or switch models in the new project |
Earlier 2.5 usage ran on Google Cloud (Vertex AI), not on the Developer API | Past calls went to the Google Cloud endpoint instead of generativelanguage.googleapis.com | Switch models; Google says Developer API eligibility comes from Developer API use |
Past use was too old or too light to count as active | Usage exists but is months old; one paid Tier 1 user with a December 2025 key was blocked | Switch models; Google publishes no threshold and no review process |
The request names a preview ID that is already shut down | The model string has a date suffix, such as gemini-2.5-flash-preview-09-2025 | Use a current stable model; the preview is listed as shut down |
........
The second row is easy to miss. Forum threads include a developer who created a separate project for an overseas version of an existing app and found that the new project could not reach the model the original one still used, because the copied code kept the old model string.
··········
[[ADPLUS_300x250_1]]
HOW TO FIX THE GEMINI 2.5 404 STEP BY STEP.
Google does not offer a way to request access to the 2.5 models for a project that lacks it. In the threads where developers asked for access to be restored, staff repeated the general policy without addressing the individual project. The working fix is a model change, done in this order.
1. Confirm that the problem is the model. Send the same request with the same key to gemini-3.8-flash. If it succeeds, the key, billing and API settings are fine and only the 2.5 access rule is blocking you.
2. Pick the replacement. For gemini-2.5-flash, Google's December routing points to gemini-3.5-flash-lite, and its advice for new projects names both 3.5 Flash-Lite and 3.8 Flash. For gemini-2.5-pro, the routing target is gemini-3.8-flash.
3. Change the model string everywhere it appears: application code, environment variables, configuration files of frameworks and gateways, and any batch jobs that run on a schedule.
4. Re-test prompts that depend on output format. A newer model can follow instructions, use tokens and format JSON differently, so run your evaluation set or at least the prompts that feed other systems.
5. Check the cost on the official pricing page before you deploy, since the replacement models are priced differently from 2.5 Flash and 2.5 Pro. Our Gemini API pricing guide lists the current rates.
6. Keep the old project's key only if that project still serves 2.5 and you have a reason to stay on it until December 1.
The minimal REST request from Google's getting-started guide already uses the replacement model:
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.8-flash:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"contents": [
{
"parts": [
{
"text": "Explain how AI works in a few words"
}
]
}
]
}'The same request with the official google-genai Python SDK, again copied from Google's guide:
from google import genai
client = genai.Client()
response = client.models.generate_content(
model="gemini-3.8-flash",
contents="Explain how AI works in a few words"
)
print(response.text)Google's guide labels generateContent as the legacy API and recommends its Interactions API for new applications. Existing generateContent code keeps working with the new model names, so the model change and a later move to the Interactions API can be handled as two separate jobs.
........
Old model | Recommended for new projects | Gemini Developer API from December 1, 2026 | Google Cloud (Agent Platform) |
gemini-2.5-flash | gemini-3.5-flash-lite or gemini-3.8-flash | Requests routed to gemini-3.5-flash-lite | Shut down October 20, 2026 |
gemini-2.5-pro | gemini-3.8-flash | Requests routed to gemini-3.8-flash | Shut down October 20, 2026 |
gemini-2.5-flash-lite | gemini-3.5-flash-lite | No routing or shutdown date listed | Shut down October 20, 2026 |
........
··········
GEMINI 2.5 AFTER DECEMBER 1: WHAT THE REROUTING CHANGES.
Google's Firebase AI Logic model page, updated on November 6, states that starting December 1, 2026, "requests to the general-use Gemini 2.5 Flash and Pro models will be automatically routed to newer models" on the Gemini Developer API, and warns that the rerouting may cause breaking changes. We covered the announcement and its price effects in our report on the December 1 rerouting.
For developers stuck on the 404, the rerouting raises an obvious possibility: requests that fail today could start returning answers in December, produced by the newer model. Google has not documented whether projects without 2.5 access will be routed or will keep getting the error, so building on that assumption is a risk. Changing the model string now gives the same result as the rerouting with one difference that favors you: you choose the model and test it before the switch, instead of discovering a changed model in production.
The same page also states a general rule that explains the whole episode. Several weeks before a model's shutdown date, projects with no prior usage of that model are blocked from starting to use it. The 2.5 restriction follows that logic even though Google has not set a shutdown date for the Developer API versions.
··········
WHAT GOOGLE DOCUMENTS ABOUT THE 2.5 ACCESS LIMIT AND WHAT DEVELOPERS ONLY REPORT.
........
Point | Status | Source |
2.5 access limited to past active users | Documented | Model page, deprecations page, release notes of September 18, 2026 |
Eligibility counted per project | Stated by Google staff | Developer forum, November 2, 2026 |
Vertex AI usage does not grant Developer API access | Implied by staff, not stated outright | Developer forum, November 2, 2026 |
2.5 Flash and 2.5 Pro routed to newer models from December 1 | Documented | Firebase AI Logic models page |
models.list and models.get still show 2.5 to blocked projects | Reported by developers | Several forum threads, August to November 2026 |
Minimum usage that counts as active | Not published | Google has given no figure |
Process to restore access | None described | Staff replies repeat the general policy |
........
··········
HOW TO AVOID THE NEXT GEMINI MODEL 404.
The 2.5 episode shows that a model listed by the API can still be unavailable to your project, so a successful models.list call proves nothing about whether generation will work. A health check that sends one tiny generateContent request with the exact model string your app uses catches the problem at deploy time instead of in production.
New projects should start on the models Google recommends today rather than on the one an older tutorial or a copied repository uses. Our guide to Claude, Gemini and DeepSeek API model names explains how Gemini's stable, preview and alias names behave, which helps when choosing what to pin.
Two official pages deserve a place in your monitoring: the Gemini API release notes and the deprecations page, both on ai.google.dev. The September 18 restriction and the October routing of 3.7 Flash and 3.5 Flash to newer versions were both announced there. Error handling should also separate the two common failure codes: a 404 on generateContent points to model availability, while a 429 points to quota, which our Gemini API rate limits guide covers in detail.
··········
GEMINI 2.5 FLASH 404: THE CONCLUSIONS FOR DEVELOPERS.
The 404 NOT_FOUND on gemini-2.5-flash and gemini-2.5-pro is a deliberate access rule. Google restricted the 2.5 models on the Gemini Developer API to projects that already used them, documented the change on September 18, 2026, and left the models visible in the model list, which is what makes the error look like a bug. Keys, billing and API versions are not the cause, and Google describes no way to get access back.
The reliable fix is to move to gemini-3.8-flash or gemini-3.5-flash-lite and test the change, because Google will route 2.5 Flash and 2.5 Pro traffic to those models on December 1 anyway. What remains unclear is whether blocked projects will receive routed answers after that date and how much past usage counted as active; Google has published neither, so neither should be part of a production plan.
··········
FOLLOW US FOR MORE.
·····
DATA STUDIOS
·····
datastudios.org




