OpenAI 404 — "The model '...' does not exist or you do not have access to it" (model_not_found)
Filed under APIs, auth & CORS
The model name in your request is misspelled, invented, retired, or simply not available to your API key's project — the error covers all four.
Fastest route
Give your AI this prompt
Copy it, replace the bracketed part with your error, and send it.
Preview the prompt
I am getting an OpenAI API error 404 with code model_not_found: "The model '[name from the error]' does not exist or you do not have access to it." The model name is set in my code/settings here: [paste the line or setting where the model is chosen]. If it helps, here is the list of models my API key can access: [paste the output of GET /v1/models, or say "I have not checked yet"]. Please: 1) tell me which case this is — misspelled or invented name, retired model, or a real model my project cannot access — based on the evidence, 2) if the name is wrong, correct it to a model that appears in my key's list and fits what the app uses it for, 3) if the model is real but inaccessible, tell me the account-side steps instead of changing code. Constraints: never invent a model name — only use IDs from my key's actual model list or the official models documentation, and do not change unrelated features while fixing this.
Fix it yourself
Follow the repair
- Read the model name inside the error and compare it exactly. The message quotes what it rejected: "The model 'gpt-…' does not exist or you do not have access to it." Find that same string in your code, your environment variables, or your builder's settings, and compare character by character. Model IDs are exact — one wrong suffix or an invented "pro" or "turbo" variant is a different, nonexistent model.
- List the models your own key can actually use. This is the decisive test. Ask the API directly with your key:
The response is your key's real menu. If the model you want is not on it, no code change will conjure it — the problem is the name or your access, full stop.curl https://api.openai.com/v1/models \ -H "Authorization: Bearer $OPENAI_API_KEY" - Swap in a listed model temporarily to prove the pipeline works. Pick a general-purpose model that is in your list, put it in the app, and make one call. Success tells you the key, billing, and code are all healthy, and the only thing wrong was the original model's name or availability. Now you can solve that one problem calmly instead of debugging everything at once.
- If the name is right, think access and projects. API keys belong to a project, inside an organization. Check in the platform dashboard which project your key was created in — a fresh project commonly lacks models your older one had. Some models also require the organization to be verified, or unlock as your usage tier grows with payment history. Those gates are on the account side; no amount of retrying or code editing opens them.
- If the name comes from a setting or variable, print it. When the model string is assembled from an environment variable or a field in your builder's settings, log the exact value being sent at runtime. Empty values produce this error with a suspiciously blank model name, and stale values keep asking for models from a previous project long after you moved on. The error message quotes what was actually sent — compare it with what you meant to send.
- If the model was retired, move to its replacement. Models are deprecated and shut down on published schedules, and code outlives them. Check the model name against the official models and deprecations documentation: retired models name a recommended successor. Switch to it deliberately, and expect small behaviour differences — a replacement model is a new model, not the old one with a fresh label.
Why this happensOptional explanation
Every API request names a model, and OpenAI checks that name against two things: does a model with this exact ID exist, and is this key's project allowed to use it? Fail either check and you get the same deliberately vague 404 — OpenAI does not tell strangers which models exist but are off-limits to them, so "does not exist" and "you do not have access" share one message.
In AI-built apps, the wrong name usually arrives honestly. A builder trained on older information writes the flagship model name from a year ago, or invents a confident-sounding upgrade that never existed. A tutorial names a model that has since been retired. Or the name is perfectly real — but your key was created in a fresh project, and new API models roll out to accounts gradually, gated behind usage history or organization verification. Meanwhile the same model works in the ChatGPT app, which is a different product with a different door, and proves nothing about your API key.
- Invented or misspelled name: the model ID in the code does not match any real model, character for character.
- Retired model: it existed when the tutorial or code was written; it has since been shut down.
- No access yet: the model is real, but your project has not been granted it — new accounts and new projects start with a subset.
- Wrong project key: keys are scoped to a project; a key from another project sees a different menu.
Quick answers
The model exists — I use it in ChatGPT. Why no access?
Because ChatGPT and the API are different products with different doors. A model can be live in the ChatGPT app while your API project has no access to it yet — new models roll out to API accounts gradually, and some need usage history or account verification first. Your key's model list is the only source of truth for what you can call.
It worked last week and broke today. What changed?
Two usual suspects: the model was retired and replaced (old tutorials and AI builders keep naming dead models), or the key changed — a new key from a different project than the one that had access. List the models with the current key and compare against what the code asks for.
How do I get access to a model my key cannot see?
There is no separate apply button for most models. Access widens as an account's usage and payment history grows, and some models ask for organization verification in the platform settings. In practice: use an available model from your list now, and re-check the list after your account has some real usage behind it.