I had codex originally authenticate via openAI web. Since i hit my limit i would now want to upgrade to the "pay per use" via api key. After following all the steps on https://github.com/openai/codex/blob/main/docs/authentication.md#usage-based-billing-alternative-use-an-openai-api-key (set variable in global environment, retrigger authentication
codex --config preferred_auth_method="apikey"
I'm sent to the initial login screen. I select "Provide your own API Key" and see: Login Failed -> as far as i understand this means it does not read my api key correctly. When "enter" i get thrown back to the login screen.
When:
echo $OPENAI_API_KEY
my key, that i have previously set, and charged up with a few bucks, is red successfully and I am also forcing.
# ~/.codex/config.toml
preferred_auth_method = "apikey"
Expecting to log in via APIKey