Tokaify APITokaify API
API Reference
Scenario Examples

CC Switch

CC Switch integration guide for Tokaify

Keep these values handy

CC Switch is a desktop tool for managing and switching CLI configurations. When connecting Tokaify, the most common point of confusion is the endpoint difference between tools:

  • Claude Code: https://api.tokaify.com
  • Codex: https://api.tokaify.com/v1
  • API Key: the full sk-... secret copied from the console

Step 1: Install CC Switch

Open the CC Switch project page, download the installer for your system, and complete the installation.

CC Switch supports Claude Code, Codex, Gemini CLI, OpenCode, OpenClaw, and more. This guide focuses on the Tokaify configuration for Claude Code and Codex.

Step 2: Create a key in Tokaify

  1. Sign in to Tokaify.
  2. Open Token Management.
  3. Click Add Token and save it.
  4. In the token list, click Copy Secret to get the full sk-... value.

Important

When using CC Switch, always use the full secret directly. Do not remove the sk- prefix manually.

Step 3: Add a provider

In the CC Switch main window, click + in the upper-right corner to open the Add New Provider page.

Click the plus button in the CC Switch toolbar

At the top, choose the tool type you want to configure:

  • For Claude Code, choose Claude
  • For Codex, choose Codex

Then choose Custom Configuration under the preset provider options.

Choose a custom configuration and fill in Tokaify basics

Step 4: Configure Claude Code

If you want CC Switch to manage Claude Code, use the following values:

FieldValueNotes
Provider NametokaifyOnly affects how it appears inside CC Switch
Websitehttps://www.tokaify.comUsed as provider reference info
API Keysk-...Use the full secret
Request URLhttps://api.tokaify.comFor Claude Code, use the root URL and do not add /v1
API Input FormatAnthropic Messages (Native)Choose the corresponding Claude option in CC Switch
Auth FieldANTHROPIC_AUTH_TOKEN (default)The default option is usually correct
Primary ModelFor example claude-sonnet-4-6Replace with a model available to your account
Thinking ModelFor example claude-sonnet-4-6Can match the primary model
Default Haiku ModelFor example claude-sonnet-4-6Use an account-available model
Default Sonnet ModelFor example claude-sonnet-4-6Use an account-available model
Default Opus ModelFor example claude-opus-4-7Use an account-available model

If CC Switch shows a Configuration JSON area, make sure it includes this:

Disable Claude Code experimental betas in the configuration JSON

{
  "env": {
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
  }
}

This disables Claude Code experimental betas, which helps avoid validation errors caused by extra fields like context_management in some versions.

Step 5: Configure Codex

If you want CC Switch to manage Codex, switch the tool type at the top to Codex before adding the provider.

FieldValueNotes
Provider NametokaifyOnly affects CC Switch presentation
API Keysk-...Use the full secret
Request URL / Base URLhttps://api.tokaify.com/v1Codex requires /v1 here
ModelFor example gpt-5.4Replace with a model available to your account

Codex must use a /v1 endpoint

Codex uses an OpenAI-compatible API. In CC Switch, the Codex request URL must be https://api.tokaify.com/v1. If you only enter https://api.tokaify.com, you may see empty model lists, 404 errors, or path mismatches.

Step 6: Save and switch

After saving the provider, return to the CC Switch main window:

  1. Choose the tool you want to switch, such as Claude or Codex
  2. Select the tokaify provider you just added
  3. Click switch or save so CC Switch writes the local configuration for that tool
  4. Close the current terminal, reopen it, and then launch the target CLI again

Step 7: Verify the setup

For Claude Code, start it and enter:

Reply with "Claude Code is connected to Tokaify", then list the top-level directories in the current project.

For Codex, start it and enter:

Reply with "Codex is connected to Tokaify", then tell me the current model name.

If the responses work normally, CC Switch has successfully switched the tool to Tokaify.

FAQ

Why do Claude Code and Codex use different endpoints

Claude Code uses Anthropic-style configuration, so ANTHROPIC_BASE_URL should use the root endpoint:

https://api.tokaify.com

Codex uses an OpenAI-compatible API, so its Base URL needs the versioned path:

https://api.tokaify.com/v1

What should I do if Codex returns 404

First confirm that the Codex request URL in CC Switch is exactly:

https://api.tokaify.com/v1

If you only entered https://api.tokaify.com, add /v1, save again, and switch once more.

What should I do if I get 401 or 403

Check these items first:

  1. Whether the API key is the full sk-... secret
  2. Whether the token is disabled, expired, or out of balance
  3. Whether the current model is allowed by the token
  4. Whether an IP restriction is blocking the request

How is this guide?

Last updated on