CC Switch setup for BetterToken
Manage BetterToken API Keys, endpoints, and model settings for Claude Code, Claude Desktop, Codex CLI, OpenCode, and OpenClaw in CC Switch.
CC Switch is an optional desktop app for managing the API Key, endpoint, and model settings of Claude Code, Claude Desktop, Codex CLI, OpenCode, and OpenClaw.
Install CC Switch
macOS
Homebrew is the easiest option. You can also download the latest .dmg or .zip from GitHub Releases.
brew tap farion1231/ccswitchbrew install --cask cc-switchWindows
Download the latest CC-Switch-v{version}-Windows.msi installer or the portable .zip build from GitHub Releases.
Linux
Download the latest .deb, .rpm, or .AppImage build from GitHub Releases.
What to prepare
- BetterToken API Key (register here)
- Claude Code uses the Anthropic protocol, so its
Base URLishttps://bettertoken.ai - Codex, OpenCode, and OpenClaw use the OpenAI-compatible protocol, so their
Base URLishttps://bettertoken.ai/v1 - Prepare one current model ID for Codex, OpenCode, and OpenClaw. You can copy it from the BetterToken model plaza, or let CC Switch fetch it from
/v1/models
Add a BetterToken provider
Claude Code
In CC Switch, select Claude Code and click Add Provider.
Connect Claude Code with your BetterToken API Key, Base URL https://bettertoken.ai, and the Model ID you want to use.
- Provider Name:
BetterToken - API Key:
YOUR_API_KEY - API Endpoint:
https://bettertoken.ai
Use the Anthropic Messages API format. Enter your chosen Model IDs under Model Mapping, then save the configuration.
Copy the exact Model ID from the model plaza.
Save the configuration, activate BetterToken, and fully restart the client.
Claude Desktop
Claude Desktop supports only Claude models. This is a Claude Desktop client limitation.
Open the separate Claude Desktop page in CC Switch to add a provider or import existing Claude Code providers. Review the imported Claude Model IDs and connection mode before activating it; see the official Claude Desktop manual.
For setup directly in Claude Desktop, use the Claude Desktop setup guide to configure Gateway, Base URL https://bettertoken.ai, your BetterToken API Key, and Gateway auth scheme x-api-key. Save with Apply Changes to relaunch Claude Desktop.
Codex
With current CC Switch, sign in officially first if you want to preserve that login. Open Settings → App config → Codex and enable Keep official login for direct switches, then add or activate BetterToken. Do not overwrite the official login file with a third-party Key.
Open Codex in CC Switch and add a provider
Open CC Switch, switch to Codex, and click Add Provider. If CC Switch asks you to choose a preset first, prefer OpenAI Compatible or Custom.
The numbered markers in the screenshot match these actions:
- Switch to Codex
- Click Add Provider in the top-right corner

Fill the basic fields
- Provider Name:
BetterToken - Base URL:
https://bettertoken.ai/v1 - API Key: your BetterToken API Key
If you switch to a custom config view, make sure the underlying config uses wire_api = "responses".
The numbered markers in the screenshot match these fields:
- Provider Name
- API Key
- Base URL

Fetch and map a model
Click Fetch Models and choose a current Model ID from the model plaza. Codex does not require the CC Switch proxy.
Save and switch
Save and activate BetterToken. The third-party API Key goes in the provider configuration in config.toml; the login preservation switch controls whether official auth.json remains.
After saving, return to the list and confirm that the BetterToken entry is marked as In Use.

OpenCode
Open OpenCode in CC Switch and add a provider
Open CC Switch, switch to OpenCode, and click Add Provider. If CC Switch asks for a preset first, prefer OpenAI Compatible or Custom.
Fill the basic fields
- Provider Name:
BetterToken - Base URL:
https://bettertoken.ai/v1 - API Key: your BetterToken API Key
- API Format:
OpenAI Compatible
Choose the default model
Use Fetch Models when possible. If you need to enter the model manually, use a current model ID from the BetterToken model plaza.
OpenCode reads the saved provider configuration directly and does not require the CC Switch proxy.
Save and switch
Add the provider in CC Switch, then select the BetterToken provider and model inside OpenCode. CC Switch writes this provider alongside your other OpenCode providers.
OpenClaw
Open OpenClaw in CC Switch and add a provider
Open CC Switch, switch to OpenClaw, and click Add Provider. If CC Switch asks for a preset first, prefer OpenAI Compatible or Custom.
Fill the basic fields
- Provider Name:
BetterToken - Base URL:
https://bettertoken.ai/v1 - API Key: your BetterToken API Key
- API Format:
OpenAI Responses API
If you are editing a custom OpenClaw provider config, make sure api is set to openai-responses.
Choose the default model
Use Fetch Models when possible. If you need to enter the model manually, use a current model ID.
OpenClaw uses the saved provider configuration directly and does not require the CC Switch proxy.
Save and switch
Add the provider in CC Switch, then select the BetterToken provider and model inside OpenClaw. CC Switch writes this provider alongside your other OpenClaw providers.
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.
- Claude Desktop: quit the app completely, reopen it, and confirm that Gateway appears in the lower-left corner.
- Codex: restart the current Codex 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/modelin Discord.
CC Switch-specific advanced features
CC Switch can preserve official Codex login during direct switching. Unified Codex session history is optional and affects only the CLI resume list; current desktop-only users do not need it. Continuing a session across providers can fail, so start a new session after switching. See official login and session history.
Common issues
-
Do not add
/v1to the Claude CodeBase URL -
Codex, OpenCode, and OpenClaw should use
https://bettertoken.ai/v1 -
When Codex, OpenCode, or OpenClaw asks for a model, use a model ID
-
If Fetch Models fails, check the API key and
Base URL, then paste the model ID manually -
If changes do not take effect, confirm that BetterToken is active in CC Switch for Codex, or selected inside OpenCode/OpenClaw, then restart the affected client or gateway as described above
-
If Codex blocks sending after the official allowance runs out, preserving the official login can keep that lock in place. Follow the official release guidance: switch to direct mode, turn off Keep official login for direct switches under Settings → App config → Codex, activate BetterToken, and fully restart Codex. This uses API Key mode and removes access to features that require the official login; restore the login-preserving setup when the allowance resets.
Related pages
-
Claude Code details: Claude Code
-
Direct Claude setup for Claude Desktop: Claude Desktop
-
Codex details: Codex
-
OpenCode details: OpenCode
-
OpenClaw details: OpenClaw

