OpenClaw
OpenClaw is an open-source AI agent platform that can connect to any OpenAI-compatible inference provider. This guide walks through configuring OpenClaw to use CompactifAI as its reasoning model via the OpenAI Chat Completions API.
Before you begin, ensure you have:
- A CompactifAI API key
- The model ID you want to use (for example
hypernova-60b,carina-60b, orglm-5-2) - Your CompactifAI API endpoint (typically
https://api.compactif.ai/v1)
How it works
Section titled “How it works”OpenClaw --> CompactifAI APIOpenClaw sends requests directly to CompactifAI using the OpenAI-compatible /v1/chat/completions endpoint. No proxy or translation layer is required.
1. Install OpenClaw
Section titled “1. Install OpenClaw”macOS / Linux
Section titled “macOS / Linux”curl -fsSL https://openclaw.ai/install.sh | bashWindows (PowerShell)
Section titled “Windows (PowerShell)”iwr -useb https://openclaw.ai/install.ps1 | iexAlternatively, if you already have Node.js installed:
npm install -g openclaw@latest2. Start the classic onboarding wizard
Section titled “2. Start the classic onboarding wizard”Launch the interactive setup:
openclaw onboard --classicWhen prompted:
- Accept the security disclaimer.
- Select Manual setup.
- Choose Local gateway (this machine).
- Accept the default workspace directory unless you have a reason to change it.
3. Configure CompactifAI
Section titled “3. Configure CompactifAI”When prompted for Model/auth provider, select:
More…└── Custom ProviderThen enter the following values:
| Prompt | Value |
|---|---|
| API Base URL | https://api.compactif.ai/v1 |
| API Key | Your CompactifAI API key |
| Endpoint compatibility | OpenAI-compatible |
| Model ID | A model ID from the Models Catalog (for example hypernova-60b, carina-60b, or glm-5-2) |
| Endpoint ID | Accept the generated value (custom-api-compactif-ai) or enter your own |
| Model alias | Optional |
| Does this model support image input? | Select Yes for multimodal models; otherwise No |
OpenClaw verifies the endpoint by sending a test completion request. Continue once you see:
Verification successful.4. Configure the Gateway
Section titled “4. Configure the Gateway”The onboarding wizard then configures the local gateway.
Unless you have specific networking requirements, accept the default values:
| Prompt | Recommended value |
|---|---|
| Gateway port | 18789 |
| Gateway bind address | Loopback (127.0.0.1) |
| Gateway access protection | Token (recommended) |
| Tailscale exposure | Off |
| Gateway token | Generate a new token or reuse an existing one |
5. Configure Chat Channels
Section titled “5. Configure Chat Channels”OpenClaw supports connecting to messaging platforms including Discord, Slack, Telegram, WhatsApp, Signal, Microsoft Teams, Matrix, and many others.
When prompted:
Set up a chat channel now?Choose:
- Yes to configure a messaging platform immediately.
- No to finish the installation and configure channels later.
You can add or update channels at any time after installation.
6. Launch OpenClaw
Section titled “6. Launch OpenClaw”Start OpenClaw:
openclawor launch the default assistant directly:
openclaw crestodianOpenClaw will use the CompactifAI model you configured during onboarding.
7. Verify the Connection
Section titled “7. Verify the Connection”Try a simple prompt:
Hello! Which model are you using?or
Write a Python function to calculate Fibonacci numbers.If the model responds successfully, OpenClaw is communicating with CompactifAI correctly.
Requests are sent using the same OpenAI-compatible Chat Completions API described in Chat Completion.
Troubleshooting
Section titled “Troubleshooting”| Issue | Solution |
|---|---|
| 401 Unauthorized | Verify your CompactifAI API key from the Authentication page. |
| 404 Model Not Found | Ensure the model ID exactly matches a deployed model from the Models Catalog. |
| Verification failed | Confirm the API Base URL is correct and that the endpoint implements POST /v1/chat/completions. |
| Connection failed | Verify the endpoint is reachable and includes the /v1 suffix. |
| Streaming errors | Ensure your deployment supports Server-Sent Events (SSE) for streaming responses. |
| Gateway unavailable | Verify that the local gateway is listening on 127.0.0.1:18789, or rerun openclaw onboard --classic. |
For details about request and response formats, see Chat Completion and the API Reference.