After you run codex select Sign in with ChatGPT. You'll need a Plus, Pro, or Team ChatGPT account, and will get access to our latest models, including gpt-5, at no extra cost to your plan. (Enterprise is coming soon.)
Important: If you've used the Codex CLI before, you'll need to follow these steps to migrate from usage-based billing with your API key:
Update the CLI with codex update and ensure codex --version is greater than 0.13
Ensure that there is no OPENAI_API_KEY environment variable set. (Check that env | grep 'OPENAI_API_KEY' returns empty)
Run codex login again
If you encounter problems with the login flow, please comment on this issue.