Configure Model Providers
We recommend using CC Switch to complete the configuration — an open-source provider management tool with visual controls, no need to manually edit JSON or environment variables.1. Install CC Switch#
macOS#
Or go to Releases to download the .dmg for manual installation.Windows#
Go to Releases to download the .msi installer.Linux#
2. Add 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 Configuration#
Fill in as shown below and click + Add to complete.| Configuration Item | Value | Description |
|---|
| ❶ Provider Name | my Codex | Custom |
| ❷ Website URL | |
| ❸ API Key | Your tokenhot API Key | Obtain at api.tokenhot.ai |
| ❹ Request URL | | Do not add a trailing slash |
| ❺ API Format | OPenAI Compatible | OpenAI-compatible format |
| ❽ Write to Global Config | ✅ Checked | Write to global configuration, effective for all projects |
Step 3: Enable the Provider#
After adding, return to the list, select My codex, and click the Use button. A "Switch Successful" notification confirms it's done. Ensure Write to Global Config is checked — the configuration will be automatically written to config.toml.3. Verify Configuration#
A normal AI response indicates successful configuration.4. Specify a Model#
Troubleshooting#
Q: "Authentication error"Confirm the API Key is correctly filled in and check that the request URL has no trailing slash.Confirm the request URL is https://api.tokenhot.ai without a trailing slash. Modified at 2026-05-29 02:58:02