API Docs
Client Setup

CC Switch Setup

Use the open-source desktop tool CC Switch to add UnioAPI configurations for Claude Code, Codex and the Claude app, and switch between them in one click.

CC Switch is an open-source desktop tool that manages connection settings for Claude Code, Codex and similar tools through a GUI. It writes each tool's configuration for you, so switching no longer means editing environment variables or config.toml by hand.

Details depend on your version

CC Switch moves quickly; managing the Claude desktop app needs a recent version. Button names reflect the version at the time of writing.

Prerequisites

  • CC Switch installed from the package for your system on its GitHub Releases page. If macOS says the developer can't be verified, allow it under System Settings → Privacy & Security.
  • The tools you want to manage, e.g. Claude Code or Codex.
  • A topped-up UnioAPI account and an API key.

Add UnioAPI for Claude Code

Create a provider

Switch to the Claude page at the top, click + in the top-right corner and choose a custom provider.

The new provider form in CC Switch
public/docs/screenshots/cc-switch-add-provider.png · 1600×1000

Fill in

FieldValue
NameUnioAPI
API KeyYour UnioAPI key
Base URLhttps://api.unioapi.com (no /v1)
Model (optional)e.g. claude-sonnet-5; leave empty to use Claude Code's default

Enable it

Back in the list, click Enable on the UnioAPI row. CC Switch writes ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN into Claude Code's configuration. Open a new terminal and run claude.

Enabling UnioAPI in the CC Switch list
public/docs/screenshots/cc-switch-enable.png · 1600×1000

Add UnioAPI for Codex

Switch to the Codex page and create a custom provider the same way:

FieldValue
NameUnioAPI
API KeyYour UnioAPI key
Base URLhttps://api.unioapi.com/v1
Modele.g. gpt-5.6-sol

After you enable it, CC Switch writes ~/.codex/config.toml. Make sure wire_api there is responses; see Codex setup.

Add UnioAPI for the Claude app

Recent versions have a Claude Desktop page: create a provider with the same address as Claude Code (https://api.unioapi.com) and your key, enable it, then fully quit and reopen the Claude app. You can also skip CC Switch and follow Claude app setup.

FAQ

SymptomCheck
Still connected to the old service after switchingOpen terminals or apps keep the old settings; open a new terminal or restart the app
Claude Code returns 404The base URL has an extra /v1
Codex reports a provider configuration errorCheck that wire_api in the generated config.toml is responses
401 / 402Invalid key, or the balance is too low

Next steps