Skip to main content

What is OpenClaw

OpenClaw is an open-source, self-hosted personal AI assistant and gateway that connects chat channels such as WhatsApp, Slack, Discord, Telegram, iMessage, and WebChat to AI agents. It can send supported model requests through Capriole AI by configuring custom OpenAI-compatible and Anthropic-compatible model providers.

Prerequisites

Before you begin, make sure you have:

Installation

curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard

Configuration

Configure the GPT provider:
export CUSTOM_API_KEY="YOUR_CAPRIOLE_AI_API_KEY"
export CAPRIOLE_OPENAI_BASE_URL="https://api.caprioletech.com/v1"

openclaw onboard --non-interactive \
  --accept-risk \
  --mode local \
  --auth-choice custom-api-key \
  --custom-base-url "$CAPRIOLE_OPENAI_BASE_URL" \
  --custom-model-id "openai-latest" \
  --custom-provider-id "capriole-ai-openai" \
  --custom-compatibility openai \
  --secret-input-mode ref \
  --gateway-port 18789 \
  --gateway-bind loopback \
  --skip-channels \
  --skip-search \
  --skip-skills \
  --skip-health \
  --no-install-daemon

openclaw config set models.providers.capriole-ai-openai.request.auth \
  '{"mode":"authorization-bearer","token":"${CUSTOM_API_KEY}"}' \
  --strict-json

openclaw config set models.providers.capriole-ai-openai.api \
  '"openai-responses"' \
  --strict-json

openclaw config set models.providers.capriole-ai-openai.models \
  '[
    {
      "id": "openai-latest",
      "name": "OpenAI latest",
      "api": "openai-responses",
      "contextWindow": 400000,
      "maxTokens": 128000,
      "input": ["text"],
      "reasoning": true,
      "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
    },
    {
      "id": "openai/gpt-5.5",
      "name": "GPT 5.5",
      "api": "openai-responses",
      "contextWindow": 400000,
      "maxTokens": 128000,
      "input": ["text"],
      "reasoning": true,
      "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
    },
    {
      "id": "openai/gpt-5.4-mini",
      "name": "GPT 5.4 mini",
      "api": "openai-responses",
      "contextWindow": 400000,
      "maxTokens": 128000,
      "input": ["text"],
      "reasoning": true,
      "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
    }
  ]' \
  --strict-json
Configure the Anthropic provider:
export CUSTOM_API_KEY="YOUR_CAPRIOLE_AI_API_KEY"
export CAPRIOLE_ANTHROPIC_BASE_URL="https://api.caprioletech.com"

openclaw onboard --non-interactive \
  --accept-risk \
  --mode local \
  --auth-choice custom-api-key \
  --custom-base-url "$CAPRIOLE_ANTHROPIC_BASE_URL" \
  --custom-model-id "claude-latest" \
  --custom-provider-id "capriole-ai-anthropic" \
  --custom-compatibility anthropic \
  --secret-input-mode ref \
  --gateway-port 18789 \
  --gateway-bind loopback \
  --skip-channels \
  --skip-search \
  --skip-skills \
  --skip-health \
  --no-install-daemon

openclaw config set models.providers.capriole-ai-anthropic.request.auth \
  '{"mode":"authorization-bearer","token":"${CUSTOM_API_KEY}"}' \
  --strict-json

openclaw config set models.providers.capriole-ai-anthropic.api \
  '"anthropic-messages"' \
  --strict-json

openclaw config set models.providers.capriole-ai-anthropic.models \
  '[
    {
      "id": "claude-latest",
      "name": "Claude latest",
      "api": "anthropic-messages",
      "contextWindow": 200000,
      "maxTokens": 32000,
      "input": ["text"],
      "reasoning": true,
      "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
    },
    {
      "id": "claude-opus-4-8",
      "name": "Opus 4.8",
      "api": "anthropic-messages",
      "contextWindow": 200000,
      "maxTokens": 32000,
      "input": ["text"],
      "reasoning": true,
      "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
    },
    {
      "id": "claude-opus-4-7",
      "name": "Opus 4.7",
      "api": "anthropic-messages",
      "contextWindow": 200000,
      "maxTokens": 32000,
      "input": ["text"],
      "reasoning": true,
      "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
    },
    {
      "id": "claude-opus-4-6",
      "name": "Opus 4.6",
      "api": "anthropic-messages",
      "contextWindow": 200000,
      "maxTokens": 32000,
      "input": ["text"],
      "reasoning": true,
      "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
    },
    {
      "id": "claude-sonnet-4-6",
      "name": "Sonnet 4.6",
      "api": "anthropic-messages",
      "contextWindow": 200000,
      "maxTokens": 32000,
      "input": ["text"],
      "reasoning": true,
      "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
    }
  ]' \
  --strict-json
Allow the configured Capriole AI models for the default agent:
openclaw config set agents.defaults.models \
  '{"capriole-ai-openai/openai-latest":{},"capriole-ai-openai/openai/gpt-5.5":{},"capriole-ai-openai/openai/gpt-5.4-mini":{},"capriole-ai-anthropic/claude-latest":{},"capriole-ai-anthropic/claude-opus-4-8":{},"capriole-ai-anthropic/claude-opus-4-7":{},"capriole-ai-anthropic/claude-opus-4-6":{},"capriole-ai-anthropic/claude-sonnet-4-6":{}}' \
  --strict-json

Run OpenClaw

Start the gateway:
export CUSTOM_API_KEY="YOUR_CAPRIOLE_AI_API_KEY"
openclaw gateway --force --port 18789
Open the TUI in another terminal:
export CUSTOM_API_KEY="YOUR_CAPRIOLE_AI_API_KEY"
openclaw tui

Supported models

OpenClaw supports OpenAI latest, GPT 5.5, GPT 5.4 mini, Claude latest, Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6 through Capriole AI. Use openai-latest and claude-latest for new setups.
  • openai-latest
  • openai/gpt-5.5
  • openai/gpt-5.4-mini
  • claude-latest
  • claude-opus-4-8
  • claude-opus-4-7
  • claude-opus-4-6
  • claude-sonnet-4-6

Troubleshooting

Why do GPT requests fail?

Confirm that models.providers.capriole-ai-openai.api is set to "openai-responses" and baseUrl is https://api.caprioletech.com/v1.

Why do Anthropic requests fail?

Confirm that models.providers.capriole-ai-anthropic.api is set to "anthropic-messages" and the Anthropic baseUrl is https://api.caprioletech.com without /v1.

Why does authentication fail?

Export CUSTOM_API_KEY in the terminal that starts openclaw gateway and in the terminal that starts openclaw tui.

Why does OpenClaw report that a model is not allowed or unavailable?

Run openclaw models list, then confirm the selected model and any agents.defaults.models allowlist include the Capriole AI model reference, such as capriole-ai-openai/openai-latest, capriole-ai-openai/openai/gpt-5.5, capriole-ai-anthropic/claude-latest, capriole-ai-anthropic/claude-opus-4-8, capriole-ai-anthropic/claude-opus-4-6, or capriole-ai-anthropic/claude-sonnet-4-6. If a Capriole AI model appears as missing, update the model entry with the full object shown above. Current OpenClaw releases need more than id and name for custom provider models.

Why doesn’t the gateway start?

Run openclaw status, openclaw gateway status, openclaw logs --follow, and openclaw doctor. Fix schema, gateway.mode, or service issues before retrying.

Why does port 18789 fail?

Choose another local port and use the same port for the gateway and client setup. For service-mode installs, run openclaw doctor --fix or openclaw gateway install --force after changing the port.

Notes