Skip to content

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 carina-60b, carina-60b, or glm-5-2)
  • Your CompactifAI API endpoint (typically https://api.compactif.ai/v1)
OpenClaw --> CompactifAI API

OpenClaw sends requests directly to CompactifAI using the OpenAI-compatible /v1/chat/completions endpoint. No proxy or translation layer is required.

Terminal window
curl -fsSL https://openclaw.ai/install.sh | bash
Terminal window
iwr -useb https://openclaw.ai/install.ps1 | iex

Alternatively, if you already have Node.js installed:

Terminal window
npm install -g openclaw@latest

Launch the interactive setup:

Terminal window
openclaw onboard --classic

When 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.

When prompted for Model/auth provider, select:

More…
└── Custom Provider

Then 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 carina-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.

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

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.

Start OpenClaw:

Terminal window
openclaw

or launch the default assistant directly:

Terminal window
openclaw crestodian

OpenClaw will use the CompactifAI model you configured during onboarding.

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.

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.