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

# CC Switch

> Configure CC Switch to use KiosAPI as the backend provider for Claude Code.

# CC Switch

[CC Switch](https://github.com/farion1231/cc-switch) is a tool for switching between different API providers for Claude Code. This guide shows you how to configure it to use KiosAPI.

## Prerequisites

* [Claude Code](https://docs.kiosapi.com/tutorials/claude-code.md) installed and configured
* A **KiosAPI API key** (starts with `sk-`)
* **Node.js 18+**

## Installation

Install CC Switch globally:

```bash theme={null}
npm install -g cc-switch
```

Verify the installation:

```bash theme={null}
cc-switch --version
```

## Configuration

### 1. Add KiosAPI as a provider

Create or edit the CC Switch configuration file:

| Platform | Config Path |
| - | - |
| Windows | `C:\Users\<username>\.cc-switch\config.json` |
| macOS | `/Users/<username>/.cc-switch/config.json` |
| Linux | `/home/<username>/.cc-switch/config.json` |

```json theme={null}
{
  "providers": {
    "kiosapi": {
      "name": "KiosAPI",
      "baseUrl": "https://kiosapi.com",
      "apiKey": "sk-xxx",
      "model": "claude-sonnet-5",
      "smallFastModel": "claude-haiku-4-5",
      "disableBetas": true
    }
  },
  "default": "kiosapi"
}
```

Replace `sk-xxx` with your actual KiosAPI key.

> [!NOTE]
>
> Set `"baseUrl"` to `https://kiosapi.com` (without `/v1`). Claude Code appends the API path automatically.

### 2. Set environment variables (alternative)

You can also configure CC Switch by setting environment variables directly:

**Windows (PowerShell):**

```powershell theme={null}
setx ANTHROPIC_BASE_URL "https://kiosapi.com"
setx ANTHROPIC_AUTH_TOKEN "sk-xxx"
```

**macOS / Linux:**

Add to `~/.bashrc` or `~/.zshrc`:

```bash theme={null}
export ANTHROPIC_BASE_URL="https://kiosapi.com"
export ANTHROPIC_AUTH_TOKEN="sk-xxx"
```

## Usage

### Switch to KiosAPI

```bash theme={null}
cc-switch use kiosapi
```

### Switch back to another provider

```bash theme={null}
cc-switch use anthropic
```

### Show current provider

```bash theme={null}
cc-switch current
```

### List available providers

```bash theme={null}
cc-switch list
```

## Verify Your Setup

After switching to KiosAPI, test the configuration:

```bash theme={null}
claude "Say hello"
```

If Claude responds, CC Switch is correctly routing through KiosAPI.

> [!TIP]
>
> Use the **`Claude-Kiro`** token group on KiosAPI for the best pricing when using Claude Code.

## Troubleshooting

### Provider not found

* Verify the provider name in `cc-switch use <name>` matches a key in `config.json`
* Check the config file is at the correct path for your platform

### Authentication Error after switching

* Ensure the `apiKey` in the config is correct and starts with `sk-`
* Verify `baseUrl` is `https://kiosapi.com` (no trailing slash, no `/v1`)

### Invalid Beta Flag

If you see a `400` error about beta flags, ensure `"disableBetas": true` is set in the provider config. This adds `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` to the environment.

## Need Help?

* [Claude Code Setup Guide](https://docs.kiosapi.com/tutorials/claude-code.md)
* [KiosAPI Dashboard](https://kiosapi.com)
* [Available Models](https://docs.kiosapi.com/api-reference/models/list-models.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.