Inference APIs
Reference/Errors/Gemini API

Gemini API 404 NOT_FOUND: "models/gemini-2.0-flash is not found" (shut down June 1, 2026)

Gemini 2.0 Flash was the default cheap model in a large share of the tutorials, starter kits and framework examples written in 2025, which is why the id is still in more than half a million files on GitHub. Google announced its shutdown on the deprecations page and turned it off on June 1, 2026. Since then every call to it, on the native API and on the OpenAI-compatible endpoint, returns 404 NOT_FOUND with the message above. The message is the same one Google returns for a mistyped id, so it does not say the model was retired.

Last verified September 18, 2026 against Google: Gemini API deprecations, Google: Gemini models · 4 min read

ProviderGemini API (generativelanguage.googleapis.com), including its OpenAI-compatible endpoint
HTTP status404 Not Found
Status fieldNOT_FOUND
Messagemodels/gemini-2.0-flash is not found for API version v1beta, or is not supported for generateContent
Modelsgemini-2.0-flash, gemini-2.0-flash-001, gemini-2.0-flash-lite, gemini-2.0-flash-lite-001; also text-embedding-004
Shut downJune 1, 2026 for the 2.0 Flash family; January 14, 2026 for text-embedding-004
How commonAbout 631,000 files on GitHub contain gemini-2.0-flash and 80,000 contain gemini-2.0-flash-lite (GitHub code search, September 17, 2026)
Can you wait it out?No. The model is gone. The same message is returned for typos, which is why it is easy to misread
Short answer
  • Rename: gemini-2.0-flash to gemini-3.6-flash, gemini-2.0-flash-lite to gemini-3.1-flash-lite, text-embedding-004 to gemini-embedding-2.
  • Re-test: the replacements think by default and their prices and rate limits differ. Check latency and cost on your own prompts before rolling out.
  • Embeddings: a new embedding model means re-embedding every stored vector; the sizes do not match.

What the error looks like

HTTP 404 · Gemini API (generativelanguage.googleapis.com)
{
  "error": {
    "code": 404,
    "message": "models/gemini-2.0-flash is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.",
    "status": "NOT_FOUND"
  }
}

On the OpenAI-compatible endpoint (/v1beta/openai/chat/completions) the status is also 404 and the message text is the same. SDKs surface it as NotFound or a generic API error, usually with the model id in the text.

Which ids were shut down, and when

Retired idShut downGoogle's replacementNotes
gemini-2.0-flash, gemini-2.0-flash-001June 1, 2026gemini-3.6-flashSame request shape; different model, price and default behaviour
gemini-2.0-flash-lite, gemini-2.0-flash-lite-001June 1, 2026gemini-3.1-flash-lite
text-embedding-004January 14, 2026gemini-embedding-2Different vector size: existing indexes must be re-embedded
gemini-2.0-flash-preview-image-generationNovember 14, 2025gemini-2.5-flash-image
gemini-2.0-flash-lite-previewDecember 9, 2025gemini-2.5-flash-lite

Dates are from Google's deprecations page as of September 18, 2026. Google gives notice on that page and by email to project owners; the ids stop working on the date shown.

Fix 1: rename the id at Google

Python (google-genai) · rename
from google import genai

client = genai.Client(api_key="...")
resp = client.models.generate_content(
    model="gemini-3.6-flash",        # was "gemini-2.0-flash"
    contents="Summarise this in one line: ...",
)

Three things change with the rename and are worth measuring rather than assuming:

  • Thinking. The 3.x Flash models reason before answering by default. For short requests that is slower and costs more output tokens than 2.0 Flash did. Google documents a thinking-budget control if you want it off or capped.
  • Price and limits. Different per-token prices and different free-tier and paid quotas. The 429 RESOURCE_EXHAUSTED behaviour is covered on its own page.
  • Output. Newer models format answers differently. Anything that parses the reply, especially JSON extraction, needs a regression run.

Fix 2: an open model in the same slot

Gemini 2.0 Flash sat in the "cheap and fast" slot. Open-weight models now fill that slot on any OpenAI-compatible endpoint, which means the same code works against several hosts and the id never disappears because a vendor retired it. Ours:

Python (openai SDK) · an open flash-class model instead
from openai import OpenAI

client = OpenAI(api_key="your-inferenceapis-key", base_url="https://api.inferenceapis.com/v1")
resp = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V4-Flash",   # or zai-org/GLM-5.3-Flash
    messages=[{"role": "user", "content": "Summarise this in one line: ..."}],
    extra_body={"reasoning": {"enabled": False}},   # flash-style: answer without thinking first
)
print(resp.choices[0].message.content)

DeepSeek V4 Flash is $0.19 in and $0.38 out per million tokens here; GLM 5.3 Flash is $0.20 and $0.66. Both take a 1M-token context. Measured speed and thinking time for each are on the model pages. Neither is Gemini, so run your evaluation set before switching, the same as you would for the rename.

text-embedding-004

The embedding shutdown is the more disruptive one, because vectors from one model cannot be compared with vectors from another. Whatever you move to, every stored vector has to be produced again with the new model, and the index rebuilt. If you would rather that never happens again, open-weight embedding models such as BGE-M3 can be run by any host or on your own hardware, so the model you embedded with stays available. Our embeddings endpoint serves BGE-M3 and Qwen3 Embedding at $0.02 per million tokens.

Frequently asked questions

The error says "not found for API version v1beta". Is it a version problem?

No. The wording is generic. After June 1, 2026 the model does not exist on any API version.

I use Vertex AI, not the Gemini API. Same dates?

Vertex AI publishes its own model lifecycle table with its own dates. Check it; they are usually close but not identical.

Why not just alias gemini-2.0-flash to a similar model?

Because a program that asks for Gemini and silently gets DeepSeek is a program whose behaviour changed without a code change. We alias only ids that map to the same weights, such as Groq's retired Llama ids.

Where Inference APIs fits

We do not serve Gemini models and we do not alias gemini-2.0-flash to anything, because it would be a different model answering under a familiar name. What we do serve is the same slot: small, fast, cheap open models on an OpenAI-compatible endpoint, billed per token, hosted in the United States with zero retention. If your 2.0 Flash workload was summarising, extraction, classification or chat, DeepSeek V4 Flash or GLM 5.3 Flash with thinking off is the like-for-like test.

Something changed or wrong? Tell us and we will re-verify the entry.