> ## 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 配置指南

> Codex API guide - Ace Data Cloud

CC Switch は、Codex のプロバイダーと API キーをグラフィカルインターフェースで管理できます。

## 1. API キーの取得

[Ace Data Cloud アプリケーションリスト](https://platform.acedata.cloud/console/applications)を開き、利用可能なアプリにアクセスして API キーをコピーします。

![Ace Data Cloud API キーの取得](https://cdn.acedata.cloud/dvc3cg.jpg)

## 2. CC Switch のインストール

[CC Switch Releases](https://github.com/farion1231/cc-switch/releases/latest)からダウンロードしてインストールするか、macOS で次のコマンドを実行します：

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

## 3. プロバイダーの追加

1. CC Switch を開き、**Codex** に切り替えます。
2. **Add Provider** をクリックし、**Custom** を選択します。
3. 次のように入力します：

| フィールド | 内容 |
| - | - |
| Name | `acedatacloud` |
| Base URL | `https://api.acedata.cloud/v1` |
| API Key | 先ほどコピーした Ace Data Cloud API キー |

CC Switch がカスタム設定エディタを提供する場合、設定は次のように保持されるべきです：

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

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

CC Switch は API キーを `~/.codex/auth.json` に保存します：

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

上記のプロバイダーに `env_key` または `[model_providers.acedatacloud.auth]` を追加しないでください；手動設定と CC Switch 設定のいずれかを選択してください。`model` を固定する必要はなく、Codex で直接選択できます。

## 4. 有効化と検証

`acedatacloud` プロバイダーを有効にし、完全に終了して Codex または VS Code を再起動します。`/model` を実行し、プロバイダーが `acedatacloud` であることを確認し、モデルを選択して簡単なメッセージを送信します。

401 が返された場合、現在有効になっているのが `acedatacloud` であることを確認し、`~/.codex/auth.json` の `OPENAI_API_KEY` が先ほどコピーした Ace Data Cloud API キーであるか確認してください。呼び出し履歴は [使用履歴](https://platform.acedata.cloud/console/usages) で確認できます。


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