base_url and API Key. No BetterToken-specific model name is needed — the default Codex model works out of the box.
Prerequisites
- Node.js installed
- BetterToken API Key (register here)
Install Codex CLI
Setup
Edit the Codex config file
Config file location:
~/.codex/config.toml (create if it doesn’t exist)Add the following (replace YOUR_API_KEY with your BetterToken API Key):Set the environment variable
~/.zshrc or ~/.bashrc.Verify
Send a test message after startup. A normal response confirms the connection is working. If you encounter issues, check thatbase_url is set to https://www.bettertoken.com/v1 and that BETTERTOKEN_API_KEY is exported.