OpenAI model_not_found error: 3 causes, 3 different fixes

The OpenAI API returns a 404 with the message "The model gpt-4 does not exist or you do not have access to it" for three completely different reasons. Fixing the wrong one wastes time. This page walks through each cause in order of likelihood and shows you the exact fix for each.

The 30-second answer

What the error looks like

The full error JSON from the API looks like this:

{
  "error": {
    "message": "The model `gpt-4` does not exist or you do not have access to it.",
    "type": "invalid_request_error",
    "param": "model",
    "code": "model_not_found"
  }
}

In the Python SDK, this surfaces as a NotFoundError (an openai.NotFoundError with HTTP status 404). Note the message is the same whether the model doesn't exist or you simply don't have access — you have to diagnose the cause separately.

Cause 1: wrong model ID string (most common)

OpenAI model IDs are exact, case-sensitive strings with no abbreviations. There is no fuzzy matching. A single wrong character produces a 404. Common mistakes:

What you typedWhat's wrongCorrect ID
gpt4Missing hyphengpt-4o
gpt-4Refers to the original GPT-4, now deprecated/redirected; probably not what you wantgpt-4o
gpt-4o-latestNot a real IDgpt-4o
chatgptChatGPT is a product, not an API model IDgpt-4o or gpt-4o-mini
gpt-4-32kDeprecated, no longer availablegpt-4o (128k context)
o1-previewEarly access version, may be removed from your tiero1

Current valid model IDs (as of May 2026): gpt-4o, gpt-4o-mini, gpt-4-turbo, o1, o1-mini, o3-mini. Always verify against the OpenAI models page rather than typing from memory — the page shows the exact strings, including dated snapshot versions like gpt-4o-2024-08-06.

Cause 2: your account doesn't have access to that model

Even if the model ID is spelled correctly, your account may not be authorized to use it. OpenAI gates some models by:

How to list models your account can actually use

from openai import OpenAI

client = OpenAI()
models = client.models.list()

# Print all available model IDs
for m in models.data:
    print(m.id)

# Or filter to just the chat models you probably care about
gpt_models = [m.id for m in models.data if "gpt" in m.id or m.id.startswith("o")]
print(sorted(gpt_models))

This call only returns models your account is authorized to use — so if a model ID appears in the output, it's both correctly named and accessible. If a model you expect isn't listed, you don't have access (yet).

Cause 3: deprecated model

OpenAI retires old model versions on a published deprecation schedule. Once a model is deprecated, API calls to it return 404 — the model genuinely no longer exists at that ID. Notable deprecations:

Deprecated model IDRetiredRecommended replacement
gpt-3.5-turbo-0301June 2024gpt-4o-mini
gpt-3.5-turbo-0613June 2024gpt-4o-mini
gpt-4-0314June 2024gpt-4o
gpt-4-32k / gpt-4-32k-0613June 2025gpt-4o (128k context)
gpt-4-vision-previewApril 2024gpt-4o (vision built in)

For code that has been running in production for months or years, deprecation is the most common surprise cause of a model_not_found error — something that worked fine stops working with no code changes on your end. Check the OpenAI deprecations page if a previously-working model suddenly 404s.

Fix: update the model ID string to the current replacement. Successor models are generally backward-compatible with the same API surface, so in most cases it's a one-line change.

404 model_not_found vs. 403 permission error — what's the difference?

Both errors can appear to block you from using a model, but they're different conditions:

Read the error message text carefully: a 404 will say "does not exist or you do not have access to it"; a 403 will describe a permission constraint on the operation.

FAQ

Why does the error say "does not exist or you do not have access" — can't OpenAI be more specific? This is deliberate. OpenAI returns the same vague message for both cases to prevent information leakage: if the API told you "this model exists but you don't have access," you'd know the model exists and could probe which models are available to others. The ambiguity is a security design choice.

I'm getting model_not_found for gpt-4 but it shows on the OpenAI website — why? The original gpt-4 (without a suffix) was a real model but has been deprecated/redirected. OpenAI's marketing site references "GPT-4" as a capability family, not the exact API ID. Use gpt-4o or gpt-4-turbo for current GPT-4-class capability.

How do I check my tier and which models I have access to? Go to platform.openai.com → Settings → Limits. Your current usage tier is shown there, along with the RPM/TPM limits for each model. Models that aren't listed in your account's client.models.list() output aren't available to you at your current tier.

Last updated May 28, 2026. Model IDs and deprecation dates sourced from OpenAI's models and deprecations documentation. Model availability and tier requirements change over time — verify against the current OpenAI platform documentation before relying on specifics in production.