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
- Wrong model ID string: OpenAI model IDs are exact strings.
"gpt4","gpt-4"(when you mean"gpt-4o"), and"chatgpt"are all invalid. Use the exact IDs from the models page. - No access to that model: Some models require a paid account, usage history to unlock, or an explicit access request. Check your account's available models.
- Deprecated model: OpenAI retires old model versions on a schedule. The original
gpt-4and oldergpt-3.5-turbopoint releases are gone. Migrate to a current successor. - To check what you actually have access to: call
client.models.list()— it only returns models available to your account.
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 typed | What's wrong | Correct ID |
|---|---|---|
gpt4 | Missing hyphen | gpt-4o |
gpt-4 | Refers to the original GPT-4, now deprecated/redirected; probably not what you want | gpt-4o |
gpt-4o-latest | Not a real ID | gpt-4o |
chatgpt | ChatGPT is a product, not an API model ID | gpt-4o or gpt-4o-mini |
gpt-4-32k | Deprecated, no longer available | gpt-4o (128k context) |
o1-preview | Early access version, may be removed from your tier | o1 |
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:
- Account type: GPT-4 class models require a paid account with a valid payment method. A free-tier or trial account gets 404 on any GPT-4 model, regardless of spelling.
- Usage history / spend threshold: Higher-tier models (especially
o1,o3-mini) are unlocked once your account reaches a certain cumulative spend. You won't see these models in your available list until you cross the threshold. Check your current tier and limits under Account → Limits in the OpenAI platform. - Explicit access requests: Some older models (like
gpt-4-32kbefore it was deprecated) required a separate waitlist or access request. This is less common now, but relevant if you're trying to use a model listed in old documentation. - Organization-level restrictions: In team/enterprise accounts, an org admin can restrict which models are available to members. Contact your org admin if you have access issues on a paid account.
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 ID | Retired | Recommended replacement |
|---|---|---|
gpt-3.5-turbo-0301 | June 2024 | gpt-4o-mini |
gpt-3.5-turbo-0613 | June 2024 | gpt-4o-mini |
gpt-4-0314 | June 2024 | gpt-4o |
gpt-4-32k / gpt-4-32k-0613 | June 2025 | gpt-4o (128k context) |
gpt-4-vision-preview | April 2024 | gpt-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:
- 404
model_not_found: The model doesn't exist at that ID, or your account doesn't have access. Causes: typo, deprecated model, or tier/access restriction. Fix as above. - 403 permission error: Your API key doesn't have permission for the operation you're attempting (not the model itself). More common with fine-tuning or assistants-level features, or if your API key has been scoped to limited capabilities. Check your API key's permissions in the platform settings.
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.