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

> Codex API guide - Ace Data Cloud

Codex Desktop と Codex CLI は `~/.codex/config.toml` を共有します。

## 1. API キーの取得

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

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

## 2. API キーの設定

macOS：

```bash theme={null}
launchctl setenv ACEDATACLOUD_API_KEY "あなたの API キー"
```

Windows PowerShell：

```powershell theme={null}
setx ACEDATACLOUD_API_KEY "あなたの API キー"
```

## 3. AceDataCloud の設定

`~/.codex/config.toml`（Windows は `%USERPROFILE%\.codex\config.toml`）を編集し、以下を追加します：

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

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

[model_providers.acedatacloud.auth]
command = "sh"
args = ["-c", "echo $ACEDATACLOUD_API_KEY"]
```

Windows では最後の二行を次のように変更します：

```toml theme={null}
command = "powershell"
args = ["-NoProfile", "-Command", "Write-Output $env:ACEDATACLOUD_API_KEY"]
```

`model` を記入する必要はありません；Codex を開いた後、直接モデルを選択します。

## 4. 再起動と検証

完全に終了し、Codex Desktop を再度開き、新しいローカルタスクを作成し、簡単なメッセージを送信します。Provider は `acedatacloud` と表示されるはずです；実際の呼び出しは [使用履歴](https://platform.acedata.cloud/console/usages) で確認できます。

設定が反映されていない場合は、現在のユーザーの `~/.codex/config.toml` を修正したことを確認し、環境変数が設定されていることを確認し、再度完全にアプリを再起動してください。クラウドタスクや自動化が異なる環境で実行される場合は、対応する環境で個別にキーを設定する必要があります。


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