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

# OpenClaw

> Configure OpenClaw to use Capriole AI.

## 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:

* A Capriole AI account ([Sign up here](https://capriole.ai))
* A Capriole AI API key ([Get your key](https://capriole.ai?view=api))

## Installation

```bash theme={null}
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard
```

## Configuration

Configure the GPT provider:

```bash theme={null}
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.6-terra",
      "name": "GPT 5.6 Thinking",
      "api": "openai-responses",
      "contextWindow": 1050000,
      "maxTokens": 128000,
      "input": ["text"],
      "reasoning": true,
      "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
    },
    {
      "id": "openai/gpt-5.6-luna",
      "name": "GPT 5.6",
      "api": "openai-responses",
      "contextWindow": 1050000,
      "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 Claude, Grok, GLM, and Kimi Chat Completions provider:

```bash theme={null}
export CUSTOM_API_KEY="YOUR_CAPRIOLE_AI_API_KEY"

openclaw config set models.providers.capriole-ai-compatible \
  '{
    "baseUrl": "https://api.caprioletech.com/v1",
    "apiKey": "${CUSTOM_API_KEY}",
    "api": "openai-completions",
    "models": [
      {
        "id": "anthropic/claude-fable-5",
        "name": "Fable 5",
        "api": "openai-completions",
        "contextWindow": 1000000,
        "maxTokens": 128000,
        "input": ["text"],
        "reasoning": true,
        "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
      },
      {
        "id": "anthropic/claude-opus-5",
        "name": "Opus 5",
        "api": "openai-completions",
        "contextWindow": 1000000,
        "maxTokens": 128000,
        "input": ["text"],
        "reasoning": true,
        "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
      },
      {
        "id": "xai/grok-4.5",
        "name": "Grok 4.5",
        "api": "openai-completions",
        "contextWindow": 500000,
        "maxTokens": 128000,
        "input": ["text"],
        "reasoning": true,
        "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
      },
      {
        "id": "zai/glm-5.2",
        "name": "GLM 5.2",
        "api": "openai-completions",
        "contextWindow": 1000000,
        "maxTokens": 128000,
        "input": ["text"],
        "reasoning": true,
        "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
      },
      {
        "id": "moonshot/kimi-k3",
        "name": "Kimi K3",
        "api": "openai-completions",
        "contextWindow": 1048576,
        "maxTokens": 131072,
        "input": ["text"],
        "reasoning": true,
        "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
      }
    ]
  }' \
  --strict-json
```

Configure the Anthropic provider:

```bash theme={null}
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": 1000000,
      "maxTokens": 128000,
      "input": ["text"],
      "reasoning": true,
      "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
    },
    {
      "id": "claude-fable-5",
      "name": "Fable 5",
      "api": "anthropic-messages",
      "contextWindow": 1000000,
      "maxTokens": 128000,
      "input": ["text"],
      "reasoning": true,
      "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
    },
    {
      "id": "claude-opus-5",
      "name": "Opus 5",
      "api": "anthropic-messages",
      "contextWindow": 1000000,
      "maxTokens": 128000,
      "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:

```bash theme={null}
openclaw config set agents.defaults.models \
  '{"capriole-ai-openai/openai-latest":{},"capriole-ai-openai/openai/gpt-5.6-terra":{},"capriole-ai-openai/openai/gpt-5.6-luna":{},"capriole-ai-openai/openai/gpt-5.5":{},"capriole-ai-openai/openai/gpt-5.4-mini":{},"capriole-ai-compatible/anthropic/claude-fable-5":{},"capriole-ai-compatible/anthropic/claude-opus-5":{},"capriole-ai-compatible/xai/grok-4.5":{},"capriole-ai-compatible/zai/glm-5.2":{},"capriole-ai-compatible/moonshot/kimi-k3":{},"capriole-ai-anthropic/claude-latest":{},"capriole-ai-anthropic/claude-fable-5":{},"capriole-ai-anthropic/claude-opus-5":{},"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:

```bash theme={null}
export CUSTOM_API_KEY="YOUR_CAPRIOLE_AI_API_KEY"
openclaw gateway --force --port 18789
```

Open the TUI in another terminal:

```bash theme={null}
export CUSTOM_API_KEY="YOUR_CAPRIOLE_AI_API_KEY"
openclaw tui
```

## Supported models

OpenClaw supports OpenAI latest, GPT 5.6 Thinking, GPT 5.6, GPT 5.5, GPT 5.4 mini, Fable 5, Opus 5, Grok 4.5, GLM 5.2, Kimi K3, Claude latest, Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6 through Capriole AI. Fable 5 and Opus 5 can use either the Chat Completions-compatible provider or the Anthropic Messages provider.

* `openai-latest`
* `openai/gpt-5.6-terra`
* `openai/gpt-5.6-luna`
* `openai/gpt-5.5`
* `openai/gpt-5.4-mini`
* `anthropic/claude-fable-5`
* `anthropic/claude-opus-5`
* `xai/grok-4.5`
* `zai/glm-5.2`
* `moonshot/kimi-k3`
* `claude-latest`
* `claude-fable-5`
* `claude-opus-5`
* `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 Grok, GLM, or Kimi requests fail?

Confirm that `models.providers.capriole-ai-compatible.api` is set to `"openai-completions"` 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-compatible/xai/grok-4.5`, `capriole-ai-compatible/moonshot/kimi-k3`, or `capriole-ai-anthropic/claude-latest`.

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

* OpenClaw custom providers require the provider API mode to match the Capriole AI endpoint family.
* OpenClaw 2026.4.21 completes local `exec` tool workflows with Grok 4.5, GLM 5.2, and Kimi K3 through `openai-completions`.
* Capriole AI handles the model request. OpenClaw can still shape final assistant behavior through its gateway, channels, and agent settings.
* Official references: [OpenClaw install](https://docs.openclaw.ai/install), [OpenClaw custom providers](https://docs.openclaw.ai/gateway/config-tools), [OpenClaw model providers](https://documentation.openclaw.ai/concepts/model-providers), and [OpenClaw troubleshooting](https://docs.openclaw.ai/gateway/troubleshooting).
