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 | my Codex | Custom |
| ❷ Official Website | | Provider official website |
| ❸ API Key | Your Tokenhot API Key | Get it from api.tokenhot.ai |
| ❹ Request URL | | Do not add a trailing slash |
| ❺ API Format | OpenAI Compatible | OpenAI-compatible format |
| ❽ 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 My codex, and click the Use button. When you see the "Switched successfully" message, the setup is complete. Make sure Write to General Configuration is checked, and the configuration will be automatically written to config.toml.3. Verify the Configuration#
If an AI response is returned normally, the configuration is successful.4. Specify a Model#
Troubleshooting#
Q: It says "Authentication error"Make sure the API Key has been entered correctly, and check that the request URL does not end with a slash.Make sure the request URL is https://api.tokenhot.ai and does not end with a slash. Modified at 2026-06-22 09:55:45