HomeTokenhotAPI DocumentTools
language
language
  • 中文
  • English
HomeTokenhotAPI DocumentTools
language
language
  • 中文
  • English
  1. Codex
  • navigation
  • OpenClaw
  • hermes
  • Gemini CLI
  • OpenCode
  • Cherry Studio
  • CC-Switch
  • Claude
    • Overview
    • Install Claude Code
    • Configure Model Providers
    • CCometixLine Status Bar Plugin
    • Skills Configuration
  • Codex
    • Codex CLI Installation
    • Configure Model Providers
  1. Codex

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.
PixPin_2026-05-18_14-42-08.png

Step 2: Fill in the Configuration#

Fill in the fields as shown below, then click + Add to complete.
PixPin_2026-05-18_14-52-40.png
Config ItemValueDescription
❶ Provider Namemy CodexCustom
❷ Official WebsiteProvider official website
❸ API KeyYour Tokenhot API KeyGet it from api.tokenhot.ai
❹ Request URLDo not add a trailing slash
❺ API FormatOpenAI CompatibleOpenAI-compatible format
❽ Write to General Configuration✅ CheckedWrite 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.
PixPin_2026-05-18_15-01-31.png

3. Verify the Configuration#

PixPin_2026-05-18_15-03-25.png
If an AI response is returned normally, the configuration is successful.

4. Specify a Model#

For recommended models, please refer to the Tokenhot Model Marketplace.

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.
Q: Connection timeout
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
Previous
Codex CLI Installation
Built with