codex
codex copied to clipboard
codex doesn't recognize OPENAI_API_KEY after setting it
My API key is available in the environment after running source .env, but I'm still getting
Missing OpenAI API key.
Set the environment variable OPENAI_API_KEY and re-run this command.
You can create a key here: https://platform.openai.com/account/api-keys
Does it need to be a special one, or is any OpenAI API Key accepted? (i.e. keys that are assigned to a project vs. default vs. personal)
i used
export OPENAI_API_KEY="YOUR KEY"
codex
after generating a new key, and running the export command directly in the terminal it seems to work