API / substribsion compatible
Resolved 💬 5 comments Opened Mar 9, 2026 by rockyicer Closed May 2, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
vscode IDE Extension
What feature would you like to see?
I am pro user. recently, I use gpt-5.4 fast, and the token spend much faster than normal mode.
i am runing out my quote from my account when using it inside vscode ide.
I want to switch to codex API which I brought seperately from open-router. but I can only use the codex API if log out the account from vscode ide.
I would like to directly setup+use codex API from 3rd-party api without log out from my current pro account.
it is best to insert a option that I can control when to use account token or API token I brought seperately.
log in and out and do such switch is a bit annoying.
thx
Additional information
_No response_
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I just want to clarify to make sure I understand the ask. Do you want to be able to choose the account (e.g. subscription vs. API key) on a per-thread basis within the IDE Extension? Right now, you can choose which account you want to use (by logging in that account), but all threads use the same account.
Or are you saying that you want to be able to use your API key concurrently with multiple different clients? That should already work. If it's not working for you, can you explain what symptom you're seeing?
sorry for the confusion.
Let me break it down.
Do you want to be able to choose the account (e.g. subscription vs. API key) on a per-thread basis within the IDE Extension?
Nah, that's not what I'm after. I'm totally cool with all threads using the same account I'm logged into.
My main point is this: when my pro account's quota runs out, I'm stuck. I'd love to have an option right there in the settings sidebar to just switch over to my third-party API key without having to log out of my main account. Currently, the workflow is a bit of a hassle: I have to completely log out, then select the Codex API option, and then log back in later when I want to use my subscription again. It's a bit clunky.
Are you saying that you want to be able to use your API key concurrently with multiple different clients?
Kinda, yeah! Right now, if I open a new VS Code window(as you address as client), it defaults to my logged-in pro account. If I log out in that new window to use my API key, it logs me out everywhere, including my original VS Code window. It seems like the extension's login state is shared across all my VS Code instances.
So, are you saying it should work the way I want? Like, if I log out in a second VS Code window and switch to the API key, the first window should stay logged into my pro account, and the second one should use the API key independently? If so, that's not what's happening on my end. Last time I checked, changing the auth in one window affected all the others.
Basically, I'm looking for a smoother way to switch between my subscription quota and a pay-as-you-go API key, ideally without the whole log-out/log-in dance, and for different VS Code windows to have independent auth settings.
Thanks for looking into this!
If you are logged in using one account in one Codex instance (the app, IDE extension, or CLI), you should remain logged in to that same account on that instance regardless of whether you log in to a different account on another instance. The only caveat here is if you are logged in with your ChatGPT account, there is a token that will expire after several days. Normally, the client will automatically refresh that token for you. But if you've since logged out and logged in with a different account, it won't be able to refresh, and you'll receive an error and need to log in again.
You may want to upvote #2992. I think that's the feature you're looking for here.
This feature request hasn't received enough upvotes, so I'm closing it.