Skip to main content
CC Switch is a cross-platform desktop app for managing providers across Claude Code, Codex, Gemini CLI, OpenCode, and OpenClaw. This page shows you how to connect BetterToken to CC Switch for the four BetterToken paths already covered in this docs site: Claude Code, Codex CLI, OpenCode, and OpenClaw.
Gemini CLI uses the Google / Vertex AI protocol. BetterToken has not documented that path here yet, so this guide does not cover it.

Install CC Switch

Homebrew is the easiest option. You can also download the latest .dmg or .zip from GitHub Releases.
brew tap farion1231/ccswitch
brew install --cask cc-switch

What to prepare

  • BetterToken API Key (register here)
  • Claude Code uses the Anthropic protocol, so its Base URL is https://www.bettertoken.ai
  • Codex CLI, OpenCode, and OpenClaw use the OpenAI-compatible protocol, so their Base URL is https://www.bettertoken.ai/v1
  • Prepare one current Codex group model ID for Codex CLI, OpenCode, and OpenClaw. You can copy it from the BetterToken model plaza, or let CC Switch fetch it from /v1/models
On first launch, CC Switch automatically imports the configs it already finds on your machine. You can keep your official provider as a fallback and add BetterToken alongside it.
BetterToken uses two access modes: Anthropic and OpenAI-compatible. To avoid mixing https://www.bettertoken.ai with https://www.bettertoken.ai/v1, it is better to create providers per app instead of trying to force Claude Code and the OpenAI-compatible tools into one universal provider.

Add a BetterToken provider

1

Open Claude Code in CC Switch and add a provider

Open CC Switch, switch to Claude Code, and click Add Provider.
The Claude Code page in CC Switch, with the add button in the top-right corner used to create a new provider.
2

Fill the basic fields

  • Provider Name: BetterToken
  • Base URL: https://www.bettertoken.ai
  • API Key: your BetterToken API Key
The numbered markers in the screenshot match these fields:
  1. Provider Name
  2. API Key
  3. Base URL
The provider edit page in CC Switch, showing where to enter Provider Name, API Key, and Base URL.
3

Handle model mapping based on your API Key group

  • If you use a Claude_* key, you usually do not need to change the advanced options or model mapping
  • If you use a Codex_* key, complete the extra setup below:
  1. Open Advanced Options
  2. Set API Format to OpenAI Responses API
The advanced options section in CC Switch, with API Format set to OpenAI Responses API.
  1. In Model Mapping, click Fetch Model List
  2. Explicitly choose values from the dropdowns for Primary Model, Thinking Model, Haiku Default Model, Sonnet Default Model, and Opus Default Model
The model mapping section in CC Switch, showing Fetch Model List and the mappings for Primary, Thinking, Haiku, Sonnet, and Opus models.
All of these models should use current Codex group model IDs from the BetterToken model plaza.
4

Save, switch, and decide whether to enable the proxy

After saving, go back to the provider list:
  1. Mark the BetterToken provider as the active one
  2. If you use a Claude_* key, you do not need to enable the CC Switch proxy from the top-left corner
  3. If you use a Codex_* key, enable the CC Switch proxy
The screenshot below shows the Codex_* case where the proxy needs to be enabled.
After saving, return to the provider list, set BetterToken as active, and enable the CC Switch proxy toggle in the top-left corner.

Make saved changes take effect

After saving and switching providers, restart the affected client or gateway before verifying the setup.
  • Claude Code: quit the current Claude Code session completely, then start it again.
  • Codex CLI: restart the current Codex CLI process or open a new terminal session.
  • OpenCode: quit the current OpenCode session and start it again.
  • OpenClaw: run openclaw gateway restart, then use /new, /status, and /model in Discord.

Common issues

  • Do not add /v1 to the Claude Code Base URL
  • When Claude Code uses a Codex_* key, set API Format to OpenAI Responses API under Advanced Options
  • When Claude Code uses a Claude_* key, you do not need to enable the CC Switch proxy
  • Codex CLI, OpenCode, and OpenClaw should use https://www.bettertoken.ai/v1
  • Use a Codex group model ID as the default model for Codex CLI, OpenCode, and OpenClaw
  • If Fetch Models fails, check the API key and Base URL, then paste the model ID manually
  • If switching does not take effect, confirm that BetterToken is the active provider in CC Switch and restart the affected client or gateway as described above