OpenClaw

Connect OpenClaw to APIClaw and optionally attach global messaging channels like Telegram and WhatsApp.

OpenClaw is an open-source personal AI assistant platform. Add APIClaw as an OpenAI-compatible model provider in ~/.openclaw/openclaw.json.

  • Experienced users: merge the provider block below into your existing ~/.openclaw/openclaw.json.
  • New users: install OpenClaw, run onboarding, then add the APIClaw provider.
  • Existing configs: never overwrite the full file; merge only models, agents, and channels fields.

Install OpenClaw

OpenClaw requires Node.js 22+.

bash
node --version
curl -fsSL https://openclaw.ai/install.sh | bash
# or
npm install -g openclaw@latest
openclaw onboard

During onboarding, you can skip the default model provider and configure APIClaw manually afterward.

Configure APIClaw credentials

Replace YOUR_APICLAW_API_KEY and YOUR_MODEL_ID with your real values.

SettingValue
API KeyAPIClaw API key from API Keys
Base URLhttps://apiclaw.biz/v1
Model IDFull model ID from the model hub

Web UI method

bash
openclaw dashboard

Open Settings > Advanced and merge this configuration:

json
{
  "models": {
    "mode": "merge",
    "providers": {
      "apiclaw": {
        "baseUrl": "https://apiclaw.biz/v1",
        "apiKey": "YOUR_APICLAW_API_KEY",
        "api": "openai-completions",
        "models": [
          {
            "id": "YOUR_MODEL_ID",
            "name": "YOUR_MODEL_ID",
            "reasoning": false,
            "input": ["text", "image"],
            "contextWindow": 200000,
            "maxTokens": 8192
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "apiclaw/YOUR_MODEL_ID"
      },
      "models": {
        "apiclaw/YOUR_MODEL_ID": {}
      }
    }
  }
}

Terminal method

bash
mkdir -p ~/.openclaw
nano ~/.openclaw/openclaw.json

Paste and merge the JSON above, then restart OpenClaw. Use /model in chat to confirm the active model.

Messaging channels

After the model works, add channels in the same openclaw.json. Do not overwrite existing models or agents blocks.

Telegram

Create a bot with @BotFather, then add:

json
{
  "channels": {
    "telegram": {
      "enabled": true,
      "botToken": "YOUR_TELEGRAM_BOT_TOKEN",
      "dmPolicy": "pairing",
      "groups": { "*": { "requireMention": true } }
    }
  }
}

Set the token in config or via TELEGRAM_BOT_TOKEN for the default account.

WhatsApp

Link WhatsApp through the OpenClaw gateway:

bash
openclaw channels login --channel whatsapp

Example config:

json
{
  "channels": {
    "whatsapp": {
      "dmPolicy": "pairing",
      "allowFrom": ["+15551234567"],
      "groups": { "*": { "requireMention": true } }
    }
  }
}

Discord

json
{
  "channels": {
    "discord": {
      "enabled": true,
      "token": "YOUR_DISCORD_BOT_TOKEN",
      "dm": { "enabled": true, "allowFrom": ["YOUR_DISCORD_USER_ID"] }
    }
  }
}

Slack

json
{
  "channels": {
    "slack": {
      "enabled": true,
      "botToken": "xoxb-your-slack-bot-token"
    }
  }
}

For production, prefer dmPolicy: "allowlist" and restrict allowFrom to trusted users.

Useful commands

CommandPurpose
openclawStart OpenClaw
openclaw dashboardOpen the web UI
/modelCheck or switch models
/configOpen configuration

Troubleshooting

Wrong model ID

Copy the exact model ID from the model hub for your account.

Requests not appearing

Check usage logs and confirm the API key belongs to the same account.