Short answer
A 404 with "code": "model_not_found" and the message The model `<id>` does not exist or you do not have access to it. means the endpoint you called won't serve that model ID to your key. OpenAI uses the same message whether the ID doesn't exist at all or exists but isn't available to you, so check both:
- Is the ID exact? Call
GET /v1/modelswith the same key and look for the ID in the list. - Is the model still offered? Retired models stop being accessible after their shutdown date.
- Can your project use it? Projects can limit which models their keys may call.
- Did the request go where you think? A gateway's model name sent to OpenAI, or an OpenAI ID sent to a gateway that doesn't offer it, gets this error.
In Codex signed in with ChatGPT, the model has to be available to your plan and workspace. Run /model and pick a model from the list.
What the error looks like
From the API, as raised through LiteLLM in Aider-AI/aider#2030:
Error code: 404 - {'error': {'message': 'The model `gpt-4o-2024-08-06` does not exist or you do not have access to it.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}
From Codex signed in with a ChatGPT account, in openai/codex#43344 (September 2026, shortened):
unexpected status 404 Not Found: The model `gpt-5.5` does not exist or you do not have access to it., url: https://chatgpt.com/backend-api/codex/responses, ...
From an app whose gateway settings didn't reach production, in lihor-hub/news-dashboard#552. auto was a model name that only their gateway knew:
Error code: 404 - The model `auto` does not exist or you do not have access to it. (model_not_found)
The OpenAI Python SDK raises NotFoundError for this 404.
Why it happens
| Cause | How to tell | Fix |
|---|---|---|
| Typo, or a display name instead of the API ID | The ID isn't in GET /v1/models |
Copy the exact id from the list |
| The model has been retired | It's on OpenAI's deprecations page with a past shutdown date | Move to the recommended replacement |
| Your project restricts models | The project has a model allowlist or denylist | Ask an admin to allow the model, or use a key from another project |
| The key belongs to another organization or project | The same ID works with a different key | Use a key from the organization and project that can use the model |
| The request went to the wrong host | The URL in the error, or your base URL setting, isn't what you expected | Fix the base URL, and use an ID the target endpoint lists |
| Codex: the model isn't available to your ChatGPT plan or workspace | The URL is chatgpt.com/backend-api/codex/... |
Pick another model with /model |
Model IDs. The List models endpoint lists the currently available models, with the exact id to use in requests. Names shown in ChatGPT or in a tool's menu aren't always the API ID.
Retirements. When a model shuts down, it's no longer accessible. Upcoming dates are on the deprecations page, and the List models response includes a shutdown_date field when one has been announced. For example, OpenAI announced on October 14, 2026 that gpt-4o-2024-08-06, gpt-4o-2024-11-20, gpt-4o-mini-2024-07-18, gpt-4.1-2025-04-14 and gpt-4.1-mini-2025-04-14 will be removed from the API on January 14, 2027. The recommended replacement for all five is gpt-6-luna.
Project model permissions. An organization admin can give a project a model allowlist, which permits only the listed models, or a denylist, which blocks the listed ones (project controls guide). A key from that project can't use a model outside those rules.
Wrong host. In news-dashboard#552, the gateway's base URL and key were stored under different variable names than the backend read. The app fell back to OpenAI's default endpoint and sent the gateway-only model name auto. The reverse happens too: a gateway only serves the model IDs it lists, which can differ from OpenAI's.
How to fix it
- List the models your key can use. With the same key and the same base URL as the failing request:
curl https://api.openai.com/v1/models \
-H "Authorization: Bearer $OPENAI_API_KEY"
Or in Python:
from openai import OpenAI
client = OpenAI()
ids = sorted(m.id for m in client.models.list())
print(len(ids), "models")
print("gpt-6-luna" in ids)
- If the ID isn't listed, fix the spelling or choose a listed model. If it's a model you used before, check the deprecations page.
- If the ID is listed but requests still fail, compare the key and base URL in your app with the ones you just tested. Environment variables such as
OPENAI_BASE_URLandOPENAI_PROJECT_ID, which the Python SDK reads, can point the app at a different endpoint or project. - If a project restriction applies, ask an organization admin to allow the model for that project, or use a key from a project that allows it.
If you see it in Codex
- ChatGPT sign-in. The error URL starts with
https://chatgpt.com/backend-api/codex/. According to the Codex slash command docs, the/modelpicker only shows models available to your account and workspace. Run/model, choose a listed model, then run/statusto confirm. - A model pinned in config. Check
model = "..."in~/.codex/config.tomland in any profile you use. If it names a model your account can't use, change it to one from the/modellist. - Many people at once. In September 2026, many users reported this 404 for
gpt-5.5within a few days (#43344, #43755, #44098), One reporter in #43344 confirmed thatgpt-6-astrastill worked on the same account, and the reporter of #44098 later wrote that it worked again. When a model fails for everyone at the same time, switch models and check the issue tracker instead of changing your setup. - A custom provider. The provider decides which model IDs exist. Use an ID from its model list.
Using one key for several model families
TeamoRouter is an API gateway with one key for GPT, Claude, Gemini and DeepSeek. It's OpenAI-compatible (/v1/chat/completions and /v1/responses), and GET /v1/models lists the model IDs your key can use, so you can check an ID before you put it in your code. There's no subscription; you pay per use.
- Create an API key in the TeamoRouter console. It starts with
sk-teamo-. - Top up from $5. The top-up dialog takes cards. You can also click Pay with crypto and pay with USDT, USDC or ETH from any exchange app — the checkout shows which networks your amount supports (BEP20 works from $5). Step by step: Pay with USDT.
- List the model IDs:
curl https://api.teamorouter.com/v1/models \
-H "Authorization: Bearer sk-teamo-..."
- Use one of them with the OpenAI SDK:
from openai import OpenAI
client = OpenAI(
api_key="sk-teamo-...",
base_url="https://api.teamorouter.com/v1",
)
resp = client.responses.create(model="gpt-6-sol", input="Hello")
print(resp.output_text)
For Codex, add a provider to ~/.codex/config.toml and set model to an ID from the list:
model_provider = "teamorouter"
model = "gpt-6-sol"
[model_providers.teamorouter]
name = "TeamoRouter"
base_url = "https://api.teamorouter.com/v1"
env_key = "OPENAI_API_KEY"
wire_api = "responses"
Set OPENAI_API_KEY to your TeamoRouter key and start codex from that shell. Windows commands are in Install and connect Codex. Claude models use the Anthropic protocol (/v1/messages) with the same key; see the API integration guide.
FAQ
Why does the message say "or you do not have access to it"?
OpenAI returns the same message for an ID that doesn't exist and for one your key can't use. That's why checking GET /v1/models with the same key is the quickest test.
Will a new API key fix it? Only if the new key belongs to an organization and project that can use the model. A new key in the same project has the same model access.
Is this a 401 problem?
No. A 401 such as Incorrect API key provided means the key was rejected. A 404 model_not_found means the key was accepted but the model wasn't available. See OpenAI API 401 "Incorrect API key provided".
It worked yesterday. What changed? Check the deprecations page for the model, ask whether your project's model settings changed, and in Codex, check whether others are reporting the same model.