Using BeatAPI in CC-Switch
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
- At least one supported CLI installed — Claude Code or Codex CLI.
- A BeatAPI API key — create one in Dashboard → API Keys.
Step 1: Install CC-Switch
macOS
Windows
Linux
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
- Select the Claude Code group.
- Click + at the top right.
- Fill in the form:
- Click Add.
For Codex
- Select the Codex group.
- Click + at the top right.
- A Codex provider is two blocks. In the
auth.jsonblock:
In the config.toml block:
- Name it
BeatAPIand 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.io — no /v1, because the client appends /v1/messages itself. Codex uses the OpenAI-compatible format at https://api.beatapi.io/v1 — with /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
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
- Confirm the key was copied in full, with no leading or trailing whitespace.
- Confirm it is active in Dashboard → API Keys.
- 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.tomland~/.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.

