Authenticated with URL (didn't work), and now I can't "change" to a working API key
Resolved 💬 1 comment Opened Jun 11, 2025 by altjx Closed Jun 11, 2025
What version of Codex is running?
0.1.2505172129
Which model were you using?
gpt-4.1
What platform is your computer?
Darwin 24.5.0 arm64 arm
What steps can reproduce the bug?
- Launch codex via CLI.
- When prompted to authenticate, select the URL option.
- Select an organization that does not have any API "credits" (aka $0 balance)
- Codex says insufficient quota exceeded.
- Exit codex
- Export an API key from an OpenAI organization that has API credits.
- Ask codex something in the prompt.
- Error - insufficient quota exceeded
What is the expected behavior?
When exporting OPENAI_API_KLEY with a valid API key, it should use that instead of whatever "built in" configuration it may have from the previous authentication session.
If I use this exact same OpenAI API key into other tools -- Cline, Roo Code, etc. -- it works just fine. So clearly the CLI Codex tool _isn't_ using this API key or there's something missing in the documentation or help menu to provide a different configuration to get codex to understand the new authentication process.
What do you see instead?
_No response_
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗