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

# Codex CC Switch Configuration Guide

> Codex integration guide - Ace Data Cloud

CC Switch can manage Codex's provider and API Key through a graphical interface.

## 1. Obtain API Key

Open the [Ace Data Cloud application list](https://platform.acedata.cloud/console/applications), enter the available applications, and copy the API Key.

![Get Ace Data Cloud API Key](https://cdn.acedata.cloud/dvc3cg.jpg)

## 2. Install CC Switch

Download and install from [CC Switch Releases](https://github.com/farion1231/cc-switch/releases/latest), or run on macOS:

```bash theme={null}
brew install --cask cc-switch
```

## 3. Add Provider

1. Open CC Switch and switch to **Codex**.
2. Click **Add Provider** and select **Custom**.
3. Fill in:

| Field | Content |
| - | - |
| Name | `acedatacloud` |
| Base URL | `https://api.acedata.cloud/v1` |
| API Key | The Ace Data Cloud API Key you just copied |

If CC Switch provides a custom configuration editor, the configuration should remain as:

```toml theme={null}
model_provider = "acedatacloud"

[model_providers.acedatacloud]
name = "acedatacloud"
base_url = "https://api.acedata.cloud/v1"
requires_openai_auth = true
```

CC Switch will save the API Key to `~/.codex/auth.json`:

```json theme={null}
{
  "OPENAI_API_KEY": "{token}"
}
```

Do not add `env_key` or `[model_providers.acedatacloud.auth]` in the above provider; choose either manual configuration or CC Switch configuration. There is no need to fix the `model`, you can select it directly in Codex.

## 4. Enable and Verify

Enable the `acedatacloud` provider, completely exit and restart Codex or VS Code. Run `/model`, confirm the Provider is `acedatacloud`, then select a model and send a simple message.

If a 401 is returned, confirm that the currently enabled provider is `acedatacloud`, and check if the `OPENAI_API_KEY` in `~/.codex/auth.json` is the Ace Data Cloud API Key you just copied. Call records can be viewed in the [Usage History](https://platform.acedata.cloud/console/usages).


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