Codex CLI took my api key
Resolved 💬 2 comments Opened Dec 27, 2025 by random00000000 Closed Dec 27, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
idk
What subscription do you have?
plus
Which model were you using?
cli mini
What platform is your computer?
not sure
What issue are you seeing?
Codex took my api key and build a feature around it so it is weird
What steps can reproduce the bug?
Uploaded thread: 019b60d7-b149-7ec1-95e3-4283d4589bdc
What is the expected behavior?
_No response_
Additional information
_No response_
2 Comments
Can you provide more details about the bug you're reporting? What is the expected behavior, and what behavior did you see?
From the session information you uploaded, it looks like you asked codex to build an agent. I'm guessing that you defined an environment variable with your API key. Perhaps
CODEX_API_KEY.Hi, I created the environment variable days ago to use the codex cli from
the api but it was too expensive so I logged back with my email. Today I
was trying to use the cli from a node js app but while developing I noticed
it was hitting open ai api instead of the cli like I wanted to do. But is
seems exactly as you said the api key was there to be used and the ai used
it. I started a new cli session with better instructions and then did what
I wanted so everything is fine now and the cost for the api hit is almost
nothing.
On Sat, Dec 27, 2025, 2:34 PM Eric Traut @.***> wrote: