Unable to switch to OpenAI API key after hitting rate limit on ChatGPT Plus plan

Resolved 💬 4 comments Opened Oct 27, 2025 by JamesIV4 Closed Oct 27, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.50.0

What subscription do you have?

ChatGPT Plus

Which model were you using?

gpt-5-codex medium

What platform is your computer?

Windows with codex-cli in a terminal

What issue are you seeing?

I am not able to switch to using my OpenAI API key after hitting rate limit on ChatGPT Plus plan.

I tried using a new API key, but that didn't work. I made sure my API account is funded and it is. Switching models didn't fix it either.

UPDATE: I was able to get around the issue by switching to the VSCode extension instead.

What steps can reproduce the bug?

Uploaded thread: 019a26ea-de88-73a1-83ac-1306aa018acf

What is the expected behavior?

In the past I have been able to pay for further use of the codex models when the normal usage limits are hit.

Additional information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 10 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #4065
  • #5238
  • #5182

Powered by Codex Action

etraut-openai contributor · 10 months ago

Thanks for the bug report.

I presume that you logged out of ChatGPT (codex logout or /logout slash command) and then logged in again using your OpenAI API key? It's odd that you're able to make this work in the VS Code Extension because it's using the CLI under the covers.

What behavior are you seeing when you try to use your API Key in the CLI? What error message are you seeing?

JamesIV4 · 10 months ago

Yes, correct, I used the /logout command. I thought the logs would show more so I didn't include steps to reproduce, sorry about that.

The tool that I used to submit the bug report had the specific error there (I pasted it in), but now that I got the extension working, I see codex-cli is working too, so I can't find the error code exactly again. It said connection timed out after trying to connect 5 times, but also 401 unauthorized.

Maybe the the VSCode extension and the codex-cli terminal app were conflicting with each other. I did re-launch VSCode as well. Maybe that cleared up a conflict between them.

JamesIV4 · 10 months ago

Sorry, didn't mean to mark it complete.