Configure Model Providers
It is recommended to use CC Switch to complete the configuration — an open-source provider management tool with a visual interface, so there is no need to manually edit JSON or environment variables.1. Install CC Switch#
macOS#
Or go to Releases to download the .dmg file for manual installation.Windows#
Go to Releases to download the .msi installer.Linux#
2. Add the api.tokenhotAI Provider#
Step 1: Add a New Provider#
Open CC Switch, go to the provider management page, and click the + button in the top-right corner.Step 2: Fill in the Configuration#
Fill in the fields as shown below, then click + Add to complete.| Config Item | Value | Description |
|---|
| ❶ Provider Name | api.tokenhot.ai-claude | Custom |
| ❷ Official Website | | Provider official website |
| ❸ API Key | Your api.tokenhotAI API Key | Get it from api.tokenhot.ai |
| ❹ Request URL | | Do not add a trailing slash |
| ❺ API Format / Auth Field | Anthropic Messages (Native) / ANTHROPIC_AUTH_TOKEN (Default) | Keep the default |
| ❻ Model Configuration | Leave blank | Leave blank to use the default Claude model |
| ❼ Options | Check "Hide AI Signature" and "Teammates Mode" | Check as needed |
| ❽ Write to General Configuration | ✅ Checked | Write to the global configuration so it takes effect for all projects |
Step 3: Enable the Provider#
After adding it, go back to the list, select api.tokenhot.ai-claude, and click the Use button. When you see the "Switched successfully" message, the setup is complete.3. Verify the Configuration#
Enter the project directory and start Claude Code:On first launch, press Esc to skip login. After startup, check the top information bar and confirm that API Usage Billing (❶) is displayed, which means billing is going through api.tokenhot.ai:If all of the above information is correct, the configuration is successful.4. Use Other Models#
Through api.tokenhotAI, you can use non-Claude models in Claude Code (such as Qwen, GLM, DeepSeek, etc.). You only need to filter compatible models in the model marketplace and then configure model mapping.Step 1: Filter Compatible Models#
Go to the tokenho Model Marketplace, and under API Protocol on the left, select Anthropic to filter models that support the Anthropic protocol.Step 2: Copy the Model Name#
Click the target model card. There is a copy button next to the model name, which lets you copy the model ID with one click (for example, claude-opus-4.7).Go back to CC Switch and find the Model Mapping section in the provider configuration. Fill the copied model name into the corresponding model slot. You can browse available models in the tokenhot Model Marketplace:| Mapping Slot | Description |
|---|
| Primary Model | The model Claude Code uses by default |
| Thinking Model | The model used for deep reasoning |
| Default Haiku Model | The model for lightweight tasks |
| Default Sonnet Model | The model for medium-complexity tasks |
| Default Opus Model | The model for high-complexity tasks |
Troubleshooting#
If you encounter issues, run /status in the Claude Code terminal to check the configuration:Confirm the following key fields:❶ Anthropic base URL is https://api.api.tokenhot.ai/anthropic
❷ Model shows the model currently in use
Q: It says "Authentication error"Confirm that the Anthropic base URL is correct and check whether the API Key is valid.Confirm that the request URL is set to https://api.api.tokenhot.ai without a trailing slash.Q: Streaming response is laggingapi.tokenhotAI already includes global acceleration. This is usually a local network issue, so check your local connection and try again. Modified at 2026-06-22 09:55:45