Using BeatAPI in CC-Switch

Using BeatAPI in CC-Switch

CC-Switch is an open-source desktop app that manages provider configuration for several AI coding CLIs — Claude Code, Codex CLI, Gemini CLI — in one place. Adding BeatAPI once lets you switch to it, and away from it, in a click instead of an editor.

Prerequisites

  1. At least one supported CLI installedClaude Code or Codex CLI.
  2. A BeatAPI API key — create one in Dashboard → API Keys.

Step 1: Install CC-Switch

$brew tap farion1231/ccswitch
$brew install --cask cc-switch

A signed .dmg is also available from GitHub Releases. Requires macOS 12 or later.

On first launch CC-Switch detects the CLIs already installed and can import their current configuration as the default provider.

Step 2: Add BeatAPI

The tool groups are selected at the top of the main window. Configure whichever CLIs you use.

For Claude Code

  1. Select the Claude Code group.
  2. Click + at the top right.
  3. Fill in the form:
FieldValue
NameBeatAPI
Endpoint URLhttps://api.beatapi.io
API KeyYour BeatAPI API key
API FormatAnthropic Messages
  1. Click Add.

For Codex

  1. Select the Codex group.
  2. Click + at the top right.
  3. A Codex provider is two blocks. In the auth.json block:
1{
2 "OPENAI_API_KEY": "<BEATAPI_API_KEY>"
3}

In the config.toml block:

1model = "gpt-5.6-sol"
2model_provider = "beatapi"
3
4[model_providers.beatapi]
5name = "BeatAPI"
6base_url = "https://api.beatapi.io/v1"
7wire_api = "responses"
8requires_openai_auth = true
  1. Name it BeatAPI and click Add. CC-Switch validates both the JSON and the TOML before saving.

The two URLs are deliberately different and mixing them up is the most common setup failure. Claude Code uses the Anthropic-native format at https://api.beatapi.iono /v1, because the client appends /v1/messages itself. Codex uses the OpenAI-compatible format at https://api.beatapi.io/v1with /v1.

Step 3: Switch

From the main window: select BeatAPI in the provider list and click Enable. A confirmation toast appears.

From the system tray: click the CC-Switch icon and pick the provider from the menu.

Claude Code hot-switches — a new session picks up the change. Codex needs the terminal or the agent restarted.

Models

Model IDAvailable inChoose it for
claude-fable-5-1Claude CodeThe newest generation — the default for agentic coding
claude-opus-5Claude CodeThe heaviest reasoning tier
claude-sonnet-5Claude CodeBalanced capability and speed
gpt-5.6-solCodexThe strongest coding tier
gpt-6-astraCodexThe newest generation, billed flat

Switch models with /model inside either CLI. The full catalogue is on the Text API pages, and rates on the pricing page.

FAQ

Switching had no effect

  • Claude Code — start a new session; if it persists, restart the agent.
  • Codex — restart the terminal or Codex itself.

The key is rejected

  1. Confirm the key was copied in full, with no leading or trailing whitespace.
  2. Confirm it is active in Dashboard → API Keys.
  3. Re-check the endpoint URL against the note above — Claude Code without /v1, Codex with it.

Format error when adding a Codex provider

CC-Switch validates auth.json as JSON and config.toml as TOML. Check for a missing brace or comma, a misspelled field, and typographic quotes pasted from a document.

Which files does it write?

  • Claude Code: ~/.claude/settings.json
  • Codex: ~/.codex/config.toml and ~/.codex/auth.json

CC-Switch backs these up before each switch, so hand-editing them is unnecessary.

Support

Open a support ticket from the dashboard and include the request_id from the failing response.