Terug naar handleidingen
Troubleshooting·30 augustus 2026·Bijgewerkt op 22 oktober 2026·6 min. leestijd

Anthropic API 404 not_found_error: "model: …" — why a model name that exists still 404s

The confusing part of this 404 is that the model usually does exist — in Anthropic's docs, in a blog post, in last quarter's code. What it does not exist in is the list your API key is allowed to address today.

Last reviewed on .

The confusing part of this 404 is that the model usually does exist — in Anthropic's docs, in a blog post, in last quarter's code. What it does not exist in is the list your API key is allowed to address today.

The error

response (HTTP 404)
{
  "type": "error",
  "error": {
    "type": "not_found_error",
    "message": "model: claude-3-5-sonnet"
  }
}

Causes and fixes at a glance

CauseFix
A retired dated snapshotSnapshots are deprecated on a published schedule and then stop resolving. Move to a current one.
An alias that never existed`claude-3-5-sonnet` is a family, not a callable id. Anthropic ids carry a version or a date suffix.
The model is real but not enabled for your accountNewest models can be gated by tier. The 404 is indistinguishable from a typo — check the models endpoint, not the docs.
An OpenAI model name on an Anthropic endpoint`gpt-4o` at api.anthropic.com is a missing model, not a routing error. Use a gateway if you want one endpoint for both.

Ask the API, not the documentation

Docs describe the catalogue; the models endpoint describes your catalogue. When those disagree, the endpoint is right. Anything absent from this list will 404 no matter how current it looks elsewhere.

list-models.sh
curl -s https://api.anthropic.com/v1/models \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  | grep '"id"'

Pin deliberately, upgrade deliberately

Hard-coding a dated snapshot buys reproducibility and a future 404 on a date you did not choose. Reading the model id from configuration means the fix is a deploy-time value, not a code change — and the same switch is what lets you fail over when a model is busy rather than missing.

model_config.py
import os

# One place to change when a snapshot retires.
MODEL = os.environ.get("LLM_MODEL", "claude-sonnet-5")

resp = client.chat.completions.create(
    model=MODEL,
    messages=[{"role": "user", "content": "ping"}],
)

Tell 404 apart from 400 and 403

404 means the name resolved to nothing. A 400 means the name was fine but the request was not (bad parameter, malformed content). A 403 means the model exists and you may not use it. Only 404 is fixed by changing the model string.

claude-sonnet-4-5-20250929 retires on November 30, 2026

Anthropic's model deprecations page lists claude-sonnet-4-5-20250929 as deprecated on September 30, 2026, with a tentative retirement date of November 30, 2026 on the Claude API; requests to a model past its retirement date fail (https://platform.claude.com/docs/en/about-claude/model-deprecations, read October 22, 2026). Anthropic's recommended replacement is Claude Sonnet 5.5, which Kunavo does not offer as of October 22, 2026, so a request for it returns 404 on Kunavo too. On Kunavo the dated Sonnet 4.5 id has always returned 404. The Sonnet and Opus ids you can call are the ones GET /v1/models returns, claude-sonnet-5 and claude-opus-5-5 on October 22, 2026; the catalog is the reference. In Claude Code, the sonnet alias follows Anthropic's newest Sonnet, so pin it, and the other three model variables, to ids Kunavo serves:

claude-code-models.sh
export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-5
export ANTHROPIC_MODEL=claude-sonnet-5
export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-5-5
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5

If you’re calling through Kunavo

Kunavo's catalogue is the list its /v1/models endpoint returns, and every id in it is callable on any funded key — there is no per-account model gating, so the "real but not enabled for you" cause above does not arise. Because the same endpoint serves Claude and GPT-family names, an OpenAI id is not a wrong-endpoint mistake either; it just routes. Retirements still happen upstream, and when a model is withdrawn its id is redirected or documented rather than left to 404 silently. Current ids and their per-token rates are in the Claude API price list.

Frequently asked questions

Is 404 ever a temporary error?

No. Unlike 429, 500 and 529, retrying a 404 with the same model string can only fail again. Change the string or stop.

How do I know when a snapshot retires?

Anthropic publishes deprecation dates for dated snapshots. If you pin snapshots, that schedule is a calendar item; if you read the id from config, it is a one-line change.

Why does my colleague's key work with the same name?

Model availability can differ by account tier. Compare the two /v1/models responses — that difference is the answer.

Does claude-sonnet-4-5-20250929 stop working on November 30, 2026?

On the Claude API, that is its tentative retirement date, and requests to it fail after retirement. On Kunavo the dated id already returns 404: use a Sonnet or Opus id from GET /v1/models, such as claude-sonnet-5 or claude-opus-5-5, and read the model id from configuration so that the next retirement is a one-line change.

Related guides

More error semantics live in the error reference; getting a key takes a minute via signing up and the authentication guide.