> ## 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

يمكن إدارة مزود Codex و API Key باستخدام واجهة رسومية في CC Switch.

## 1. الحصول على API Key

افتح [قائمة تطبيقات Ace Data Cloud](https://platform.acedata.cloud/console/applications)، انتقل إلى التطبيقات المتاحة ونسخ API Key.

![الحصول على Ace Data Cloud API Key](https://cdn.acedata.cloud/dvc3cg.jpg)

## 2. تثبيت CC Switch

قم بتنزيل وتثبيت من [إصدارات CC Switch](https://github.com/farion1231/cc-switch/releases/latest)، أو قم بتشغيل:

```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 Key الذي تم نسخه للتو |

إذا كان 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 Key في `~/.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` مفعل حاليًا، وتحقق من أن `OPENAI_API_KEY` في `~/.codex/auth.json` هو نفس Ace Data Cloud API Key الذي تم نسخه. يمكنك عرض سجلات الاستخدام في [سجل الاستخدام](https://platform.acedata.cloud/console/usages).


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