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

> OpenClaw が Capriole AI を使うように設定します。

## OpenClaw とは

OpenClaw は、WhatsApp、Slack、Discord、Telegram、iMessage、WebChat などのチャット チャネルを AI エージェントに接続する、オープンソースのセルフホスト個人 AI アシスタント兼ゲートウェイです。カスタムの OpenAI 互換および Anthropic 互換モデル プロバイダーを設定すると、Capriole AI 経由で対応モデルのリクエストを送れます。

## 前提条件

始める前に、次を用意してください。

* Capriole AI アカウント（[こちらから登録](https://capriole.ai)）
* Capriole AI API キー（[キーを取得](https://capriole.ai?view=api)）

## インストール

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

## 設定

GPT プロバイダーを設定します。

```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
```

Claude、Grok、GLM、Kimi の Chat Completions プロバイダーを設定します。

```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
```

Anthropic プロバイダーを設定します。

```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
```

デフォルト エージェントで、設定済みの Capriole AI モデルを許可します。

```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
```

## OpenClaw を実行する

ゲートウェイを起動します。

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

別のターミナルで TUI を開きます。

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

## 対応モデル

OpenClaw は Capriole AI 経由で 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、Sonnet 4.6 を使えます。Fable 5 と Opus 5 は、Chat Completions 互換プロバイダーまたは Anthropic Messages プロバイダーのどちらでも使えます。

* `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`

## トラブルシューティング

### GPT リクエストが失敗するのはなぜですか？

`models.providers.capriole-ai-openai.api` が `"openai-responses"` に設定され、`baseUrl` が `https://api.caprioletech.com/v1` であることを確認してください。

### Grok、GLM、または Kimi のリクエストが失敗するのはなぜですか？

`models.providers.capriole-ai-compatible.api` が `"openai-completions"` に設定され、`baseUrl` が `https://api.caprioletech.com/v1` であることを確認してください。

### Anthropic リクエストが失敗するのはなぜですか？

`models.providers.capriole-ai-anthropic.api` が `"anthropic-messages"` に設定され、Anthropic の `baseUrl` が `/v1` なしの `https://api.caprioletech.com` であることを確認してください。

### 認証が失敗するのはなぜですか？

`openclaw gateway` を起動するターミナルと、`openclaw tui` を起動するターミナルの両方で `CUSTOM_API_KEY` をエクスポートしてください。

### OpenClaw がモデルは許可されていない、または利用できないと報告するのはなぜですか？

`openclaw models list` を実行し、選択したモデルと `agents.defaults.models` の許可リストに、`capriole-ai-openai/openai-latest`、`capriole-ai-compatible/xai/grok-4.5`、`capriole-ai-compatible/moonshot/kimi-k3`、`capriole-ai-anthropic/claude-latest` などの Capriole AI モデル参照が含まれていることを確認してください。

Capriole AI モデルが欠落していると表示される場合は、上に示した完全なオブジェクトでモデル エントリを更新してください。現在の OpenClaw リリースでは、カスタム プロバイダー モデルに `id` と `name` だけでは不十分です。

### ゲートウェイが起動しないのはなぜですか？

`openclaw status`、`openclaw gateway status`、`openclaw logs --follow`、`openclaw doctor` を実行してください。スキーマ、`gateway.mode`、またはサービス問題を直してから再試行してください。

### ポート `18789` が使えないのはなぜですか？

別のローカル ポートを選び、ゲートウェイとクライアント設定で同じポートを使ってください。サービス モードのインストールでは、ポート変更後に `openclaw doctor --fix` または `openclaw gateway install --force` を実行してください。

## 注意事項

* OpenClaw のカスタム プロバイダーでは、プロバイダー API モードが Capriole AI のエンドポイント系統と一致している必要があります。
* OpenClaw 2026.4.21 は `openai-completions` 経由で、Grok 4.5、GLM 5.2、Kimi K3 によるローカル `exec` ツール ワークフローを完了します。
* Capriole AI はモデル リクエストを処理します。OpenClaw はゲートウェイ、チャネル、エージェント設定によって、最終的なアシスタントの振る舞いを形作ることができます。
* 公式リファレンス: [OpenClaw インストール](https://docs.openclaw.ai/install)、[OpenClaw カスタム プロバイダー](https://docs.openclaw.ai/gateway/config-tools)、[OpenClaw モデル プロバイダー](https://documentation.openclaw.ai/concepts/model-providers)、[OpenClaw トラブルシューティング](https://docs.openclaw.ai/gateway/troubleshooting)。
