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

> ## Agent Instructions
> Phaseo Gateway base URL: https://api.phaseo.app/v1. Send `Authorization: Bearer $PHASEO_API_KEY` with every request.
> Model IDs look like `provider/model`, for example `openai/gpt-6-astra`. Do not guess IDs: list them with `GET /v1/models` or check https://phaseo.app/models. `phaseo/free` routes to an available free model and needs no wallet balance.
> For new text integrations prefer `POST /v1/responses`. `POST /v1/chat/completions` (OpenAI format) and `POST /v1/messages` (Anthropic format) suit existing code.
> The full API contract is https://phaseo.app/docs/openapi/v1/openapi.yaml. Official SDKs: `@phaseo/sdk` (TypeScript) and `phaseo` (Python), plus Go, C#, PHP, Ruby and Rust.
> Search these docs over MCP at https://phaseo.app/docs/mcp, and install Phaseo skills with `npx skills add https://phaseo.app/docs`. If a page is wrong or out of date, report it with the MCP `submit_feedback` tool.
> Manage Phaseo accounts with the `phaseo` CLI (`npm install -g @phaseo/cli`, then `phaseo login` or `phaseo login --device-code`), the `/v1` Management API or the MCP server at `https://mcp.phaseo.app/mcp?access=manage`. Do not send users to the dashboard for account tasks. A person is still needed for sign-up, approving a sign-in, paying the first top-up on the checkout link that `phaseo credits add` returns when no card is saved, confirming each saved-card top-up from the emailed link, and account security (password, MFA, passkeys). Create API keys with `phaseo keys create --name <name> --json`; never guess one. Credit top-ups need `phaseo login --scopes billing:write` first. Task map: https://phaseo.app/docs/v1/developers/manage-from-an-agent.md.

# OpenClaw

> سجّل Phaseo كمزوّد نماذج في OpenClaw، مع قراءة المفتاح من Phaseo CLI.

شغّل `phaseo openclaw` لتسجيل مزوّد نماذج `phaseo` في OpenClaw مع كل نماذج Phaseo المتوافقة، أو أضف المزوّد باستخدام `openclaw config set` بنفسك.

## الإعداد باستخدام Phaseo CLI

```bash theme={null}
phaseo login
phaseo openclaw --model openai/gpt-6-astra
```

إذا لم يكن OpenClaw مثبتًا، تعرض CLI أمر التثبيت (`npm install -g openclaw@latest`، أو الحزمة نفسها باستخدام pnpm أو Yarn أو Bun) وتطلب موافقتك قبل تشغيله. ثم يشغّل الإعداد `openclaw config set` مرتين:

* **`secrets.providers.phaseo_cli`**: مزوّد أسرار من نوع exec يشغّل `phaseo integrations credential openclaw` لقراءة المفتاح. لا يُكتب المفتاح أبدًا في إعداد OpenClaw.
* **`models.providers.phaseo`**: مزوّد بـ Base URL ‏`https://api.phaseo.app/v1`، ونوع API ‏`openai-completions`، والمفتاح مأخوذ من `phaseo_cli`. يسرد كل نماذج النص النشطة في Phaseo التي تعمل مع Chat Completions، مع قيمة `--model` أولًا (`anthropic/claude-sonnet-4.6` بدونها).

المفتاح من نوع `Phaseo CLI: OpenClaw API Key` تنتهي صلاحيته بعد 90 يومًا وله حد إنفاق شهري قدره \$100. عندما يطلب OpenClaw المفتاح من CLI بعد انتهاء صلاحيته، تنشئ CLI مفتاحًا جديدًا.

لا يغيّر الإعداد النموذج الافتراضي في OpenClaw. اختر نموذج Phaseo باستخدام `openclaw models set` عندما تكون جاهزًا. استخدم `--catalog default` لتسجيل النموذج المحدد فقط.

## إعداد OpenClaw يدويًا

سجّل مزوّد أسرار يطبع مفتاحك، ثم مزوّد نماذج Phaseo:

```bash theme={null}
openclaw config set secrets.providers.phaseo_cli \
  '{"source":"exec","command":"phaseo","args":["integrations","credential","openclaw"],"jsonOnly":false}' \
  --strict-json

openclaw config set models.providers.phaseo '{
  "baseUrl": "https://api.phaseo.app/v1",
  "apiKey": { "source": "exec", "provider": "phaseo_cli", "id": "value" },
  "api": "openai-completions",
  "models": [
    { "id": "openai/gpt-6-astra", "name": "openai/gpt-6-astra via Phaseo", "reasoning": false, "input": ["text"] }
  ]
}' --strict-json
```

يأخذ كل إدخال في `models` الحقول `id` (معرّف نموذج Phaseo) و`name` و`reasoning` و`input` (`text` و`image`) و`contextWindow` الاختياري. أضف إدخالًا لكل نموذج Phaseo تريد أن يسرده OpenClaw.

## التحقق من أنه يعمل

شغّل `openclaw config get models.providers.phaseo --json` للتأكد من تسجيل المزوّد. اختر نموذج Phaseo باستخدام `openclaw models set`، وأرسل موجّهًا قصيرًا. تأكد من ظهور الطلب في **الإعدادات → الاستخدام → السجلات**.

## إزالة Phaseo

```bash theme={null}
phaseo integrations remove openclaw
```

يلغي هذا الأمر تعيين `models.providers.phaseo` و`secrets.providers.phaseo_cli`، ثم يلغي المفتاح. تبقى إعدادات OpenClaw الأخرى لديك. أعد تشغيل بوابة OpenClaw إذا كانت قيد التشغيل.

## إصلاح المشكلات الشائعة

| المشكلة | الحل |
| - | - |
| `OpenClaw already defines models.providers.phaseo` | لن يستبدل الإعداد مزوّد `phaseo` موجودًا. احذفه أو أعد تسميته، أو شغّل `phaseo integrations remove openclaw`، ثم أعد الإعداد. |
| تفشل الطلبات بعد نقل Phaseo CLI أو Node.js أو إعادة تثبيتهما | يحفظ الإعداد المسارات الدقيقة لـ Node.js وCLI في `secrets.providers.phaseo_cli`. شغّل `phaseo integrations remove openclaw`، ثم `phaseo openclaw` مرة أخرى. |
| `OpenClaw is not installed or is not on PATH` | ثبّت OpenClaw أو أضفه إلى `PATH`، ثم أعد تشغيل الإعداد. |
| يُرفض نموذج | تحقق من المعرّف الدقيق باستخدام [نقطة نهاية النماذج](https://phaseo.app/docs/ar/v1/api-reference/endpoint/models.md). |

للوكلاء الأخرى وقيم المزوّد التي يحتاجها كل وكيل، راجع [وكلاء البرمجة](https://phaseo.app/docs/ar/v1/guides/integrations/coding-assistants.md).


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