All articles
AI

OpenAI Codex Error Codes: A Quick Lookup for API, ChatGPT and Codex Messages (2026)

A quick lookup of OpenAI API, ChatGPT and Codex error messages. Each row gives the exact text, the likely cause in one line, where that answer comes from, and a link to the full fix.

OpenAI Codex error codes quick lookup: a pale blue clay card catalog box filled with light green index cards, one card raised above the rest
Also available in

This page lists the OpenAI Codex error codes and messages we have full guides for, across the OpenAI API, ChatGPT and Codex. Find the exact text you are seeing, read the likely cause, and open the full article for the fix. The “Basis” column tells you where each answer comes from: “Tested” means the full article shows output we got ourselves, and the other rows rely on OpenAI’s docs, the Codex source code or GitHub issues.

OpenAI API error codes

These errors come back from the API or from the official SDKs. OpenAI keeps the full list of HTTP codes in its error codes guide.

Error messageLikely causeBasisFull guide
401 Incorrect API key provided: sk-...The key is wrong, was deleted, belongs to another organization or project, or an old key is still set in an environment variable.TestedFix 401 Incorrect API key
Missing bearer authentication in headerThe request has no Authorization: Bearer header, so the key never reached OpenAI.TestedWhat we got with each bad key
APIConnectionError with Illegal header value b'Bearer sk-... 'The key has a trailing space or line break, and the Python SDK refuses to send it.TestedCheck the key for hidden characters
OpenAIError: Missing credentialsThe SDK found no key at all, usually because OPENAI_API_KEY is not set in that shell or process.TestedWhere the key is read from
403 Country, region, or territory not supported (unsupported_country_region_territory)The machine sending the request is in a location OpenAI does not support. Changing the key or retrying does not help.Docs and forum reportsFix the 403
429 Rate limit reached for requestsYou sent more requests or tokens per minute than your limit allows. Waiting and retrying with backoff works.Docs; SDK retries checked with a local mockOpenAI API 429 explained
429 with code insufficient_quota (or credit_balance_exhausted)Your credit is used up or you hit a spend limit. Retrying will not fix it; add credit or raise the limit.Docs; SDK retries checked with a local mockRate limit vs quota

If a 401 starts right after a key was pushed to GitHub or pasted somewhere public, OpenAI may have disabled it on purpose. OpenAI says it disables keys it finds on the public internet. Follow our leaked API key steps before you create a new one.

ChatGPT errors

Error messageLikely causeBasisFull guide
Payment was not approvedThe bank or card issuer declined the charge, or the 3D Secure check was not finished. OpenAI says it usually does not get the decline reason, so your bank is the fastest place to ask.OpenAI help pagesThe official fix order

Codex errors (CLI, app and VS Code)

Error messageLikely causeBasisFull guide
Selected model is at capacity. Please try a different model.OpenAI is short on servers for that model (server_is_overloaded). It is not your quota. Wait a few minutes or switch models.Codex source and a maintainer’s postsWhat “at capacity” means
You've hit your usage limitYour ChatGPT plan’s Codex allowance for the current window is used up. Run /status to see when it resets.Codex sourceCodex 429 messages
Quota exceeded. Check your plan and billing details.A billing problem: credit is used up or a spend limit was hit. Retrying does not help.Codex sourceCodex 429 messages
exceeded retry limit, last status: 429 Too Many RequestsA plain rate limit. Codex already retried and gave up. Wait, and run fewer sessions in parallel.Codex sourceCodex 429 messages
To use Codex with your ChatGPT plan, upgrade to PlusYour plan does not include Codex.Codex sourceCodex 429 messages
Codex could not start its user interfaceA bug in Codex VS Code extension 26.1021.22027. Rolling back to 26.1007.21434 fixes it for most people.GitHub issue; we compared the two packagesRoll back the extension

OpenAI Codex error codes not in this table

If the message mentions Claude, Anthropic or a 529, it is not an OpenAI error. Use our Claude Code errors list instead. When several OpenAI errors appear at once, check status.openai.com before you change any settings.

Leave a thought

Your email address will not be published.