404 model_not_found: "The model … does not exist or you do not have access to it"
The same 404 wording is used by OpenAI and by every provider that copied its API, which is why searching the message turns up unrelated answers. The error has four distinct causes, and the fix is different for each. Start by listing what the endpoint actually serves.
Last verified September 16, 2026 against OpenAI error codes, Groq deprecations · 5 min read
| Providers | OpenAI, Groq, Azure OpenAI, OpenRouter, Vercel AI Gateway and any OpenAI-compatible server |
| HTTP status | 404 Not Found |
| Error code | model_not_found (type invalid_request_error) |
| Message | The model `X` does not exist or you do not have access to it. |
| When it happens | The id in model is not served by the endpoint you called, or your key is not allowed to use it |
| Can you wait it out? | No — it fails deterministically until the id or the endpoint changes |
- Run
GET /v1/modelson the endpoint you are calling. If the id is not in the list, that is the whole problem. - Retired model? Pick the provider's replacement, or the same model on a provider that still serves it.
- Wrong id format? Groq wants
openai/gpt-oss-120b; OpenAI wantsgpt-4.1-mini; gateways often wantorg/model. - Gated or tiered model? Your key lacks access; check the provider's model page for tier requirements.
What the error looks like
{
"error": {
"message": "The model `llama-3.3-70b-versatile` does not exist or you do not have access to it.",
"type": "invalid_request_error",
"param": null,
"code": "model_not_found"
}
}SDKs raise it as NotFoundError (Python) or an error with status: 404 (Node).
Cause 1 — The model was retired
Providers shut models down on a schedule. Groq retired llama-3.3-70b-versatile and llama-3.1-8b-instant on 2026-08-16, qwen/qwen3-32b and llama-4-scout a month earlier, and lists eight retirements in the past year. Any pinned id starts failing on the shutdown date.
Fix: switch to the provider's recommended replacement (a different model), or keep the same model on a provider that still serves it. The model deprecations tracker lists dates, replacements and where each retired model is still available.
Cause 2 — Wrong id format for this provider
The same weights have different ids everywhere: openai/gpt-oss-120b (Groq, Together, Inference APIs), gpt-oss-120b (some gateways), openai/gpt-oss-120b:free (OpenRouter). Copying an id from one provider's docs into another's client is the most common cause after retirements.
curl -s https://api.groq.com/openai/v1/models -H "Authorization: Bearer $GROQ_API_KEY" | jq -r '.data[].id'
# any OpenAI-compatible endpoint:
curl -s https://api.inferenceapis.com/v1/models | jq -r '.data[].id'Cause 3 — Your key cannot use it
OpenAI gates some models behind usage tiers or organisation verification; Groq moved retired models to enterprise contracts (the models page shows Contact Sales). The model exists, but not for you. The message is deliberately the same as "does not exist" so callers cannot probe the catalog.
Cause 4 — Wrong base URL
If base_url was not applied (typo, env var not loaded, client constructed before dotenv), the request goes to OpenAI's servers with a Groq or open-model id, and OpenAI answers 404. Check which host the error came from — the request id prefix or the SDK's response.url will tell you.
Keeping the same id on another endpoint
For retirements specifically, the least-effort fix is a provider that accepts the id you already send. Inference APIs resolves aliases per model — for example llama-3.3-70b-versatile, gpt-oss-120b, whisper-1 — so a base-URL change is the only edit. See switching providers.
Frequently asked questions
Why does it say "does not exist" when I know the model exists?
Providers return the same message whether the id is unknown or your key lacks access, so the message cannot be used to enumerate private models. Check /v1/models with your key: what it lists is what you can call.
How do I stop this happening again?
Read the model id from configuration rather than hard-coding it, watch the provider's deprecations page, and add a fallback provider so a retirement degrades to a warning instead of an outage.
Where Inference APIs fits
When the cause is a retired model, one option is to keep the same id on a provider that still serves it. Inference APIs accepts common Groq and OpenAI ids as aliases (see each model page) so the fix is the base URL, not the code.
Something changed or wrong? Tell us and we will re-verify the entry.
