base_url must be https://www.bettertoken.ai/v1, and the protocol is OpenAI Responses.
Prerequisites
- Node.js installed
- BetterToken API Key (register here (
https://www.bettertoken.ai/register))
Install Codex
Setup
- Automatic setup
- Configure via CC Switch
- Manual setup
You can run the BetterToken automatic setup script directly. It only writes the BetterToken provider configuration and does not replace the installation prerequisites above. The script requires
Node.js. If you do not pass an API Key or model explicitly, the script prompts for them when the tool supports interactive input.Follow the step for your operating system. You only need one of them.Verify the setup
After startup, send a test message. A normal reply means the connection is working. If something fails, check:base_urlishttps://www.bettertoken.ai/v1wire_apiis stillresponsesmodelis a model ID copied from the Codex groupOPENAI_API_KEYin~/.codex/auth.jsonis your BetterToken API Key- No old
OPENAI_API_KEYorOPENAI_BASE_URLvariables are interfering