> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nexusapi.link/llms.txt
> Use this file to discover all available pages before exploring further.

# CC Switch setup

> Add NexusAPI configurations for Claude Code and Codex in CC Switch.

CC Switch manages local provider configurations for AI command-line tools. Add NexusAPI manually, select that provider in CC Switch, then start the corresponding CLI in a new terminal.

## Before you start

Prepare an enabled NexusAPI key, the exact model ID available to its group, and the correct endpoint. The [API and model capability matrix](/en/developer/capability-matrix) explains why a model visible on the site may still not fit a given protocol.

| Item            | Value                                      |
| --------------- | ------------------------------------------ |
| Claude endpoint | `https://nexusapi.link`                    |
| Codex endpoint  | `https://nexusapi.link/v1`                 |
| API key         | A key created in NexusAPI Token Management |
| Model ID        | Exact ID available to this key's group     |

## Install CC Switch

* macOS: `brew install --cask cc-switch`
* Windows / Linux: download the package for your system from [official releases](https://github.com/farion1231/cc-switch/releases).

<Warning>
  Only download CC Switch from its [official repository](https://github.com/farion1231/cc-switch) or its release page. Do not use pages that request payment or NexusAPI credentials.
</Warning>

## Add a provider

Open **Provider management → Add provider**, select the target app, enter the fields below, save, switch to the new provider, and restart the CLI. Interface labels can change between CC Switch releases; the endpoint, key, model, and protocol remain the important values.

### Claude Code provider

| Field               | Value                                             |
| ------------------- | ------------------------------------------------- |
| App                 | `Claude`                                          |
| Name                | `NexusAPI Claude`                                 |
| Endpoint / Base URL | `https://nexusapi.link`                           |
| API key             | Your NexusAPI key                                 |
| Primary model       | A Claude-compatible model ID available to the key |

Do **not** append `/v1` to the Claude endpoint. After switching the provider, run `claude`, use `/status`, and send a short message.

### Codex provider

| Field               | Value                                                          |
| ------------------- | -------------------------------------------------------------- |
| App                 | `Codex`                                                        |
| Name                | `NexusAPI Codex`                                               |
| Endpoint / Base URL | `https://nexusapi.link/v1`                                     |
| API key             | Your NexusAPI key                                              |
| Primary model       | An appropriate Responses / Codex model ID available to the key |

After switching the provider, run `codex` and make one read-only test request.

## Confirm the current model list

Use the selected key to see only models it can access:

```bash theme={"system"}
curl 'https://nexusapi.link/v1/models' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

Copy an ID from `data[].id`; do not guess from a provider name or copied screenshot.

## If it does not work

1. Confirm the active provider actually changed in CC Switch.
2. Restart the terminal or app after switching.
3. Check the Base URL rule: Claude has no `/v1`; Codex does.
4. Confirm the token group and exact model ID.
5. Keep the Request ID and follow [self-check](/en/faq/self-check) for a persistent error.
