Desktop · Integrations · Guide 01

CC Switch: connect Claude Code and Codex to OpenOxAI

CC Switch keeps separate profiles for each coding client. This guide covers Claude Code over Messages and Codex over Responses, with the right key and URL for each, then shows how to verify a request.

CC Switch 3.19 Claude Code 2.1.283 Claude · Messages Codex · Responses macOS · Windows · Linux ~12 min Claude Code verified · 27 Oct 2026 GPT smoke-tested · separate client
01 · Overview

A config manager, not a chat client

A profile manager for coding tools. It edits configuration; it never sees your prompts.

CC Switch is a free, open-source desktop app built with Tauri for macOS, Windows and Linux. It stores one configuration per provider and applies the one you select. For Claude Code, that configuration is a saved copy of ~/.claude/settings.json — the base URL, the token, and any other settings that profile carries.

Enabling a profile replaces that file. Claude Code then starts as usual, reads the environment it finds, and sends its request to whichever endpoint the file names. In direct mode — the mode this guide uses — there is no local proxy in the path: CC Switch edits a file, and traffic goes straight from Claude Code to OpenOxAI.

Why use it with OpenOxAI?

  • Keep working when a limit hits

    Switch to a usage-based OpenOxAI profile for the rest of the day, then switch back. No re-login and no lost project setup.

  • One profile per key or group

    Personal, work and test credentials stay separate and visible before a session starts. The URL is the same; only the key changes.

  • No credentials in your shell history

    Store the key in the profile instead of exporting it in a terminal or committing a project file.

  • Several clients, one window

    The same app manages Claude Desktop, Codex and Gemini CLI profiles — but each tab writes a different file, so keep them separate.

What you need

  • CC Switch 3.19 or a later 3.x build, installed on macOS, Windows or Linux.
  • Claude Code installed and working for the Messages walkthrough — check with claude --version.
  • An OpenOxAI key allowed to call Claude models, with credit on the plan you use.
  • Two minutes with the model library if you have not chosen a model ID yet.
02 · How it works

Profile → settings file → request

Three steps, and only the middle one is CC Switch's job.

A profile holds a copy of the Claude Code settings file. Enable writes that copy to ~/.claude/settings.json. Claude Code reads it at startup, appends /v1/messages to the base URL, and sends an Anthropic Messages request. With the OpenOxAI profile active, that request goes to https://api.openoxai.com/v1/messages.

Diagram: a CC Switch profile writes ~/.claude/settings.json, Claude Code reads it and posts to the OpenOxAI Anthropic Messages endpoint
The profile holds the endpoint and the key; Claude Code still owns the request, the tools and the transcript.

Click any figure in this guide to open it full size. This diagram shows direct mode: some CC Switch builds also offer a local proxy or failover mode, which routes requests through the app and is configured separately.

Where the model comes from

Because a profile is a settings file, it can also pin a default model (the model key) and permissions. If your profile pins one, Claude Code starts with it; --model or /model overrides it for a session. If neither sets a model, Claude Code falls back to its built-in default — which may not exist on OpenOxAI. Set a model explicitly on the first run.

03 · Install

Install CC Switch

Download from the official releases page. The walkthrough uses CC Switch 3.19 on macOS.

macOS · Apple silicon or Intel
steps
1. Open https://github.com/farion1231/cc-switch/releases
2. Download the macOS .dmg for your chip
3. Open the image and drag CC Switch into Applications
4. Launch it — the provider list is the first screen

If Gatekeeper blocks the first launch, allow it in System Settings → Privacy & Security.

First launch

The provider list is the first screen. Use Claude Code for sections 04–06 and Codex for section 07. Each tab writes a different client configuration, so keep their keys, protocols and endpoints in separate profiles.

04 · Key

Create an OpenOxAI key for Claude

The key must be allowed to call Claude models. A GPT-only key authenticates and still fails.

1

Sign in and open API Keys

Sign in at openoxai.com/login, add credit to the plan you intend to use, then open openoxai.com/dashboard/keys.

2

Create the token and pick a Claude group

Click New Token, name it something you will recognise later (for example cc-switch-macbook), and choose the group that matches the workload.

GroupBest forWhat to expect
specialFirst setup, everyday workDefault starting point with the lowest-cost routing.
reverseInteractive codingPrioritizes lower latency and higher throughput.
directLong context, productionMore direct routing for stable long-context sessions.
3

Copy the key once

The full key is shown at creation time. Copy it straight into CC Switch in the next section — not into a shell profile, a README or a ticket. If you lose it, revoke the token and create a new one.

Where the key ends up

CC Switch stores the profile locally, and enabling it writes the key into ~/.claude/settings.json as ANTHROPIC_AUTH_TOKEN. That file is readable by your user account — the same trust level as any local tool config. Do not commit it, do not sync it to a shared drive, and revoke keys you no longer use.

05 · Create profile

Add the OpenOxAI profile

Five fields, one of which is easy to get wrong. The dialog stays inactive until you enable it.

1

Open the Claude Code tab and add a provider

Make sure the Claude Code tab is selected in the icon row, then use the add control in the provider list. The dialog that opens is the one mapped below.

2

Fill the five fields

Name it OpenOxAI, paste the key, and use the root URL. Leave the advanced options alone unless your account needs a different auth header.

Field map of the CC Switch Add Provider dialog with the OpenOxAI values: name, notes, API key, request URL and advanced options
① Name. ② Notes and website. ③ API key. ④ Request URL — the root, without /v1. ⑤ Advanced options, left at their defaults.

The one field that breaks setups

Enter https://api.openoxai.com exactly. Adding /v1 produces https://api.openoxai.com/v1/v1/messages, which does not exist; adding /v1/messages doubles the path too. The request fails before a model is chosen, so changing the model will never fix it.

3

Save and check the card

The new card appears in the list with its name and note, but it is not active yet. If you keep several OpenOxAI keys, duplicate the profile and change only the key — the URL stays the same.

06 · Enable & verify

Turn it on, then prove it works

Enable swaps the settings file. One request tells you whether the swap took.

1

Click Enable on the OpenOxAI card

The button sits on the right side of the card. CC Switch writes the profile immediately; your previous profile stays stored and can be re-enabled later.

CC Switch provider list with the OpenOxAI Claude Code profile and its Enable button
A Claude Code profile named OpenOxAI. Enable activates it and writes ~/.claude/settings.json.
2

Confirm what was written

Open ~/.claude/settings.json. The profile's environment should be there — the OpenOxAI root and the token, with nothing pointed at Anthropic's own host.

~/.claude/settings.json · the entries that matter
"env": {
  "ANTHROPIC_BASE_URL": "https://api.openoxai.com",
  "ANTHROPIC_AUTH_TOKEN": "sk-…"
}

The real file usually contains more — a pinned model, permissions, hooks — depending on the profile. The two env entries decide where requests go.

3

Send a one-shot request

Start a new shell and run Claude Code with an explicit model. The exact IDs are the ones the model library lists.

ModelModel IDContextGood for
Claude Sonnet 5.5claude-sonnet-5-51MThe balanced default: edits, reviews, everyday coding.
Claude Opus 5.5claude-opus-5-51MHarder reasoning, architecture and long-form work.
terminal
claude --print --model claude-opus-5-5 \
  "Reply with exactly: CCSWITCH-OK"

--print sends the prompt, prints the answer and exits. Expect the single line CCSWITCH-OK. A hang is an auth or path problem, not a slow model.

Inside an interactive session, the same choice is /model claude-sonnet-5-5. The flag always wins over a model pinned in the profile.

4

Match the request in Usage

Open Usage and match the request by time and model. You should see claude-opus-5-5, a completed status and the token count for that turn. This catches the quiet failure: a reply billed to the wrong key.

Verification record

On 27 October 2026 a Claude Code 2.1.283 session using a CC Switch-managed OpenOxAI profile completed a request and returned CCSWITCH-OK: claude --print --model claude-opus-5-5. The temporary test key was revoked afterwards; no key appears in this page, its images or its files.

07 · Codex + GPT / Responses

Add a separate Codex profile for GPT

Keep this profile separate from the Claude Code Messages profile above.

Two clients, two protocols

Claude Code uses an Anthropic Messages key and the root URL https://api.openoxai.com. Codex uses a GPT-service key, the Responses protocol and https://api.openoxai.com/v1. Do not copy the Claude profile's URL, key or model into Codex.

1

Choose a GPT-service key

In OpenOxAI API Keys, create or select a key for the GPT service and confirm it can call gpt-6.1-sol. Use this exact lowercase model ID, not its display name. Do not use a Claude-service key for this profile.

2

Create a provider from the Codex tab

Select Codex in the top client row, click +, choose Codex Provider, then click Custom Configuration. Enter the provider name and GPT key. Keep API Request URL Full URL off and use this base URL:

CC Switch · Codex Provider
Provider Name: OpenOxAI GPT
API Request URL: https://api.openoxai.com/v1
API Request URL Full URL: Off
Default Model: gpt-6.1-sol

Do not append /responses to the base URL. With Full URL off, Codex builds the Responses request path itself.

3

Set Responses (native), save and enable

Open Advanced Options and set Upstream Format to Responses (native). Confirm the model is gpt-6.1-sol, save with Add, then click Enable on the new profile. CC Switch fills the Codex auth.json credential field from the API key; never copy a real key into a screenshot, project file or shared document.

CC Switch showing the OpenOxAI provider profile card and Enable button
Profile-card example from CC Switch. For GPT, create and enable it under the Codex tab with Responses (native).
4

Restart Codex and send hi

Fully restart the local Codex client after enabling the profile, start a new session, choose gpt-6.1-sol and send hi. A model reply confirms the active client can reach OpenOxAI; a profile card by itself does not prove inference succeeded.

first request
hi
English Devin Local conversation after sending hi and receiving a model reply
Recorded OpenOxAI GPT smoke test in English. Devin Local called OpenOxAI through OpenCode ACP and returned “Hi! What would you like help with?” using gpt-6.1-sol. This verifies that client path, not the CC Switch Codex profile above.
5

Match the request in Usage

Sign in to OpenOxAI, open Usage, and match the request time and model. Confirm the GPT model ID, a successful status, token usage and cost. This is the final check that the request used the expected key and route.

Switch back without changing Claude Code

In the Codex tab, enable your previous Codex profile to return to it. This does not change the separate Claude Code profile.

If the Codex request fails

  • 404: use https://api.openoxai.com/v1 with Full URL off; do not add /responses.
  • 401: check that this is an active GPT-service key, then save and enable the edited profile again.
  • Model not found: use the exact lowercase ID gpt-6.1-sol and confirm it is allowed for the key.
  • Protocol error: set Upstream Format to Responses (native); changing only the URL cannot change the protocol.

The live hi screenshot above came from Devin Local through OpenCode ACP. The CC Switch Codex setup steps are documented separately; this record does not claim a Codex request was sent through CC Switch.

08 · Switch back

Move between profiles without losing anything

Enabling a profile overwrites the settings file, not the other profiles.

In Claude Code, enable your original Claude profile. In Codex, use the Codex tab and enable its previous profile. The OpenOxAI profiles stay in their respective lists; switching one client does not alter the other.

Each client reads its settings when it starts, so an already-running session keeps the endpoint it began with. Start a new session after switching; restart an IDE or agent wrapper that launched claude or codex as well.

LOCAL DATA

Where the profiles live

CC Switch keeps its database and dated backups under ~/.cc-switch/. The Claude Code profile writes ~/.claude/settings.json; Codex uses its own auth and provider config.

ROLLBACK

Back to the subscription

Enable the original profile. If you edited settings.json by hand, re-enable a profile to overwrite the manual change.

SIBLING TAB

Claude Desktop is different

The Claude Desktop tab writes a gateway configuration for the desktop app, not a Claude Code settings file. Use the Claude Desktop guide for that path.

One key, several machines

Install CC Switch on each machine and add the same key, or separate keys per machine so a single revocation does not cut off every laptop. Separate keys also make Usage easier to read.

09 · Troubleshooting

Fix the request before changing the client

These checks cover the Claude Code Messages profile. The Codex Responses fixes are listed above.

404 or “not found” on every request

The URL root is wrong. Check the profile's request URL, not the model.

  • Correct: https://api.openoxai.com
  • Wrong: https://api.openoxai.com/v1 — produces /v1/v1/messages.
  • Wrong: https://api.openoxai.com/v1/messages — the client appends that path again.

Fix the field, save, click Enable again, then start a new Claude Code session.

10 · FAQ

Questions before you commit

The details people ask about after the first successful request.

Is CC Switch a chat client?

No. It has no composer and never sees your prompts. It stores provider configurations and writes the active one to the client's config file. For a chat window, use the Chatbox guide.

Does this cancel or replace my Claude subscription?

No. Your subscription stays a separate profile. CC Switch only decides which configuration Claude Code loads; enabling the other profile brings the subscription back untouched.

Where is my OpenOxAI key stored?

In the CC Switch database under ~/.cc-switch/. The Claude Code profile is also written to ~/.claude/settings.json as ANTHROPIC_AUTH_TOKEN; the Codex profile writes its own Codex auth configuration. These files are readable by your user account, so keep them out of repositories and shared backups.

Can I use the same key in CC Switch and Chatbox?

Yes. The key is an OpenOxAI credential, not a client credential, and usage from both apps lands in the same dashboard. Separate keys per client are easier to audit if you care about attribution.

Which clients can CC Switch manage?

CC Switch 3.19 has tabs for Claude Code, Claude Desktop, Codex and Gemini CLI. This guide covers Claude Code Messages and Codex Responses separately. Each tab writes a different client configuration, so do not copy keys, endpoints or model settings between them.

Do I need to restart a client after switching?

Start a new session in the client you switched. A running Claude Code or Codex session keeps the configuration it started with. If you switch mid-task, finish or save first; then restart the client so its next session picks up the new endpoint.

What happens when CC Switch updates?

Profiles live in the app's database and survive normal updates. Back up ~/.cc-switch/ before a major version jump if you keep many profiles, and re-check the provider fields after a UI change — the URL rules do not change, but labels move.