Use CC Switch
Manage separate TokensClub profiles for Claude Code and Codex with CC Switch. It manages local configuration; TokensClub still bills model usage to your account. Create one profile for each app.
On this page
Start with one-click import
TokensClub already has a CC Switch import dialog, so you usually do not need to paste JSON or TOML. Install CC Switch, then sign in to API Keys and create or choose an active key for the intended group.
Open the key’s ⋯ menu, choose CC Switch, select Claude or Codex, name the profile and choose a primary model. Claude also offers optional Haiku, Sonnet and Opus mappings. Choose models enabled for that key’s group; a name appearing in the list does not grant access.
Click Open CC Switch and, if prompted, allow the browser to open your installed app. Review the TokensClub endpoint, model and key in CC Switch before confirming the import. The link passes the selected key to your local CC Switch app; do not share key-bearing import links.
Import Claude and Codex separately using keys for their respective groups. Follow Switch and verify below to check the active provider, restarting Codex. If no app opens, check that CC Switch is installed and external-app links are allowed, or use the manual setup below.
1. Install and prepare
Download an official CC Switch release
Choose the installer for Windows, macOS or Linux and install the Claude Code or Codex client you want to use. CC Switch cannot run an absent client. Labels vary by version; the steps below use direct provider connections.
Create a TokensClub key in API Keys · Check group access and available models
Use keys authorized for the relevant Claude and GPT groups, not your account password. Keep your existing provider so you can switch back. Store settings and exported backups containing keys privately.
2. Add Claude Code
Select Claude Code in the sidebar, then Direct → Add Provider → Custom Configuration. Name it TokensClub Claude. Paste the JSON below into the config editor and replace the placeholder with your own Claude-group key.
| Base URL | https://tokensclub.top |
|---|---|
| Model | claude-sonnet-4-6 |
| Haiku | claude-haiku-4-5 |
{
"env": {
"ANTHROPIC_BASE_URL": "https://tokensclub.top",
"ANTHROPIC_AUTH_TOKEN": "YOUR_TOKENSCLUB_API_KEY",
"ANTHROPIC_MODEL": "claude-sonnet-4-6",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5"
}
}Do not append /v1 or /messages; Claude Code builds the Messages path. This example uses ANTHROPIC_AUTH_TOKEN; do not leave a different ANTHROPIC_API_KEY configured as well. After saving, click Switch or Use so the profile becomes active.
3. Add Codex
Select Codex → Direct → Add Provider → Custom Configuration and name it TokensClub Codex. Use the API Key, endpoint and model fields when available, selecting native Responses. If your version shows two editors, fill them separately as follows.
| Base URL | https://tokensclub.top/v1 |
|---|---|
| Model | gpt-6.1-sol |
| API | Responses |
In the API Key/auth.json editor, replace the placeholder with your own GPT-group key. This is a CC Switch provider field, not an instruction to overwrite the official sign-in auth.json on disk.
{
"OPENAI_API_KEY": "YOUR_TOKENSCLUB_API_KEY"
}In the config.toml editor, use native Responses as below. Protocol conversion through a local proxy is unnecessary for this setup. Do not also add the manual guide’s env_key setting; keep one credential source.
model = "gpt-6.1-sol"
model_provider = "tokensclub"
web_search = "disabled"
[model_providers.tokensclub]
name = "TokensClub"
base_url = "https://tokensclub.top/v1"
wire_api = "responses"
requires_openai_auth = falseCurrent CC Switch documentation says third-party keys are written to experimental_bearer_token in the local config.toml when switching. This is sensitive plaintext: do not commit it to a project or expose it in screenshots.
4. Switch and verify
Save, then switch to the profile in each app’s provider list. Claude and Codex selections are independent. For an initial check, close and reopen the client. Restart Codex CLI, fully quit and reopen Codex Desktop, or reload the IDE window.
Check the provider and model with /status, then try a short request such as “Reply only OK”. It uses normal model credit. Verify the model, group and charge in TokensClub usage logs. An active badge or successful latency check does not validate every tool feature.
5. Troubleshooting
For 401/403, check the full key and group permissions; do not mix Claude and GPT keys. For 404, use the domain root for Claude and /v1 for Codex, not a full request path. For an unavailable model, copy an enabled full model ID for that group from the model page.
If the old provider remains in use, check whether Direct, Routing or Aggregation is active and whether the terminal, IDE or launcher supplies old endpoint or key settings. Back up before removing conflicting settings, then restart the client. Do not delete entire config directories or sign-in files.
Manual Claude Code setup · Manual Codex setup