Using BeatAPI in CC-Switch
Add BeatAPI to CC-Switch once, and you can switch Claude Code or Codex CLI to BeatAPI, and back, with one click instead of editing config files. 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. Claude Code uses the endpoint https://api.beatapi.io, and Codex uses https://api.beatapi.io/v1.
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.
Download the .msi installer or the portable .zip from GitHub Releases. Requires Windows 10 or later.
From GitHub Releases: .deb for Debian and Ubuntu, .rpm for Fedora and RHEL, or the universal .AppImage. On Arch: paru -S cc-switch-bin.
On first launch CC-Switch detects the CLIs already installed and can import their current configuration as the default provider.
Step 2: Add BeatAPI
Select a tool group at the top of the main window, then configure each CLI 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 the provider
BeatAPIand click Add. CC-Switch validates both the JSON and the TOML before saving.
The Claude Code and Codex URLs are deliberately different, and mixing up the two URLs 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 the old provider 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 the key is active in Dashboard → API Keys.
- Re-check the endpoint URL: Claude Code uses
https://api.beatapi.iowithout/v1, and Codex useshttps://api.beatapi.io/v1.
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 CC-Switch write?
- Claude Code:
~/.claude/settings.json - Codex:
~/.codex/config.tomland~/.codex/auth.json
CC-Switch backs up these files before each switch, so you do not need to edit the files by hand.
Support
Open a support ticket from the dashboard and include the request_id from the failing response.

