すべてのプロダクト
Search
ドキュメントセンター

Alibaba Cloud Model Studio:OpenClaw

最終更新日:Nov 16, 2026

Alibaba Cloud Model Studio のモデルを OpenClaw で使用します。

クイックスタート

  1. 1

    Qwen プラグインをインストールする

    openclaw plugins install @openclaw/qwen-provider
    

    注記プラグインをインストールできない場合は、設定ファイルで構成するを参照してください。

  2. 2

    API キーを取得する

    Token Plan

    Token Plan のエディションに応じて API キーを取得します:

    従量課金

    Model Studio の API キーページで Model Studio の API キーを取得します。

    Coding Plan

    Coding Plan ページで Coding Plan の API キーを取得します。

  3. 3

    モデルを設定する

    お使いの課金プランに対応するコマンドを実行し、プロンプトが表示されたら API キーを入力します。

    Token Plan

    openclaw onboard --auth-choice qwen-token-plan-cn
    

    従量課金

    openclaw onboard --auth-choice qwen-standard-api-key-cn
    

    Coding Plan

    openclaw onboard --auth-choice qwen-api-key-cn
    
  4. 4

    確認

    次のコマンドを実行して、モデル一覧とテスト呼び出しを確認します:

    openclaw models list --provider qwen-token-plan
    openclaw agent --model qwen-token-plan/qwen3.8-max --message "Reply with: ok"
    

設定ファイルで構成する

Qwen プラグインをインストールできない場合、または設定を手動で管理する場合は、この方法を使用します。

  1. 1

    設定ファイルを開くか作成する

    ~/.openclaw/openclaw.json

    models、agents、gateway の関連するフィールドのみを更新します。ファイル全体を置き換えないでください。

  2. 2

    設定を記述する

    Token Plan パーソナル版

    YOUR_API_KEY を Token Plan パーソナル版の API キーに置き換えます。

    {
      "models": {
        "mode": "merge",
        "providers": {
          "bailian-token-plan": {
            "baseUrl": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic",
            "apiKey": "YOUR_API_KEY",
            "api": "anthropic-messages",
            "models": [
              {
                "id": "auto",
                "name": "auto",
                "reasoning": false,
                "input": [
                  "text"
                ],
                "contextWindow": 1000000,
                "maxTokens": 393216,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen4-max-preview",
                "name": "qwen4-max-preview",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 131072,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen4-max",
                "name": "qwen4-max",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 262144,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.8-max",
                "name": "qwen3.8-max",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 131072,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.8-flash",
                "name": "qwen3.8-flash",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 131072,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.7-max",
                "name": "qwen3.7-max",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.7-plus",
                "name": "qwen3.7-plus",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.6-flash",
                "name": "qwen3.6-flash",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "deepseek-v4.1-flash",
                "name": "deepseek-v4.1-flash",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "deepseek-v4.1-flash-1017",
                "name": "deepseek-v4.1-flash-1017",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "deepseek-v4-pro",
                "name": "deepseek-v4-pro",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "deepseek-v4-pro-0813",
                "name": "deepseek-v4-pro-0813",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "deepseek-v4-flash-0731",
                "name": "deepseek-v4-flash-0731",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "glm-5.3",
                "name": "glm-5.3",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 202752,
                "maxTokens": 16384,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "glm-5.2",
                "name": "glm-5.2",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 202752,
                "maxTokens": 16384,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              }
            ]
          }
        }
      },
      "agents": {
        "defaults": {
          "model": {
            "primary": "bailian-token-plan/auto"
          }
        }
      },
      "gateway": {
        "mode": "local",
        "auth": {
          "mode": "none"
        }
      }
    }
    

    Token Plan チーム版

    YOUR_API_KEY を Token Plan チーム版の API キーに置き換えます。

    {
      "models": {
        "mode": "merge",
        "providers": {
          "bailian-token-plan": {
            "baseUrl": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic",
            "apiKey": "YOUR_API_KEY",
            "api": "anthropic-messages",
            "models": [
              {
                "id": "auto",
                "name": "auto",
                "reasoning": false,
                "input": [
                  "text"
                ],
                "contextWindow": 1000000,
                "maxTokens": 393216,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen4-max-preview",
                "name": "qwen4-max-preview",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 131072,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen4-max",
                "name": "qwen4-max",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 262144,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.8-max",
                "name": "qwen3.8-max",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 131072,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.8-flash",
                "name": "qwen3.8-flash",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 131072,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.7-max",
                "name": "qwen3.7-max",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.7-plus",
                "name": "qwen3.7-plus",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.6-plus",
                "name": "qwen3.6-plus",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.6-flash",
                "name": "qwen3.6-flash",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "deepseek-v4.1-flash",
                "name": "deepseek-v4.1-flash",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "deepseek-v4.1-flash-1017",
                "name": "deepseek-v4.1-flash-1017",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "deepseek-v4-pro",
                "name": "deepseek-v4-pro",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "deepseek-v4-pro-0813",
                "name": "deepseek-v4-pro-0813",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "deepseek-v4-flash-0731",
                "name": "deepseek-v4-flash-0731",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "kimi-k2.7-code",
                "name": "kimi-k2.7-code",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 262144,
                "maxTokens": 98304,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "kimi-k2.6",
                "name": "kimi-k2.6",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 262144,
                "maxTokens": 98304,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "kimi-k2.5",
                "name": "kimi-k2.5",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 262144,
                "maxTokens": 98304,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "glm-5.3",
                "name": "glm-5.3",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 202752,
                "maxTokens": 16384,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "glm-5.2",
                "name": "glm-5.2",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 202752,
                "maxTokens": 16384,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "glm-5.1",
                "name": "glm-5.1",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 202752,
                "maxTokens": 16384,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "glm-5",
                "name": "glm-5",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 202752,
                "maxTokens": 16384,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "MiniMax-M2.5",
                "name": "MiniMax-M2.5",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 196608,
                "maxTokens": 32768,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              }
            ]
          }
        }
      },
      "agents": {
        "defaults": {
          "model": {
            "primary": "bailian-token-plan/auto"
          }
        }
      },
      "gateway": {
        "mode": "local",
        "auth": {
          "mode": "none"
        }
      }
    }
    

    従量課金

    YOUR_API_KEY を Model Studio の API キーに、{WorkspaceId} をワークスペース IDに置き換えます。

    {
      "models": {
        "mode": "merge",
        "providers": {
          "bailian": {
            "baseUrl": "https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/apps/anthropic",
            "apiKey": "YOUR_API_KEY",
            "api": "anthropic-messages",
            "models": [
              {
                "id": "qwen3.8-max",
                "name": "qwen3.8-max",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 131072,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.7-plus",
                "name": "qwen3.7-plus",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.8-flash",
                "name": "qwen3.8-flash",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 131072,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "deepseek-v4-pro-0813",
                "name": "deepseek-v4-pro-0813",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "deepseek-v4.1-flash",
                "name": "deepseek-v4.1-flash",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              }
            ]
          }
        }
      },
      "agents": {
        "defaults": {
          "model": {
            "primary": "bailian/qwen3.8-max"
          }
        }
      },
      "gateway": {
        "mode": "local",
        "auth": {
          "mode": "none"
        }
      }
    }
    

    Coding Plan

    YOUR_API_KEY を Coding Plan の API キーに置き換えます。

    {
      "models": {
        "mode": "merge",
        "providers": {
          "bailian-coding": {
            "baseUrl": "https://coding-intl.dashscope.aliyuncs.com/apps/anthropic",
            "apiKey": "YOUR_API_KEY",
            "api": "anthropic-messages",
            "models": [
              {
                "id": "qwen3.7-plus",
                "name": "qwen3.7-plus",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.6-plus",
                "name": "qwen3.6-plus",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "kimi-k2.5",
                "name": "kimi-k2.5",
                "reasoning": true,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 262144,
                "maxTokens": 98304,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "glm-5",
                "name": "glm-5",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 202752,
                "maxTokens": 16384,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "MiniMax-M2.5",
                "name": "MiniMax-M2.5",
                "reasoning": true,
                "input": [
                  "text"
                ],
                "contextWindow": 196608,
                "maxTokens": 32768,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              },
              {
                "id": "qwen3.5-plus",
                "name": "qwen3.5-plus",
                "reasoning": false,
                "input": [
                  "text",
                  "image"
                ],
                "contextWindow": 1000000,
                "maxTokens": 65536,
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                }
              }
            ]
          }
        }
      },
      "agents": {
        "defaults": {
          "model": {
            "primary": "bailian-coding/qwen3.7-plus"
          }
        }
      },
      "gateway": {
        "mode": "local",
        "auth": {
          "mode": "none"
        }
      }
    }
    

    注記qwen4-max-preview を使用する場合、params.cacheRetention で short、long、none を設定できます。long は 1 時間の TTL に対応します。

    注記qwen4-max を使用する場合、params.cacheRetention で short、long、none を設定できます。long は 1 時間の TTL に対応します。qwen4-max のコンテキスト長は 1M Token です。非思考モードの最大出力は 131,072 Token、思考と最終回答の合計は最大 262,144 Token です。デフォルトは reasoning_effort=high、thinking_budget=131072 です。

注記gateway.auth.mode: none はローカルの単一マシンでの使用にのみ適しています。共有またはリモートアクセスを行う場合は、openclaw doctor --generate-gateway-token を実行してトークンを生成し、その後 Gateway を再起動します。

メッセージングチャネルを接続する

DingTalk

注記Simple Application Server または Elastic Desktop Service を使用して OpenClaw をデプロイする場合、通常 DingTalk プラグインはプリインストールされており、グラフィカルユーザーインターフェースで設定できます。

  1. 1

    DingTalk アプリケーションを作成して認証情報を取得する

    1. DingTalk オープンプラットフォームにログインし、開発者権限を持つ組織を選択するか、組織を作成してから開発者権限を取得します。
    2. 上部のメニューバーで [アプリケーション開発] を選択し、[アプリケーションの作成] をクリックして、アプリケーション名と説明を入力し、[保存] をクリックします。
    3. [アプリケーション機能の追加] ページで [ボット] を追加します。[ボット設定] を有効にし、必須フィールドを入力し、[メッセージ受信モード] はデフォルトの [Stream モード] のままにして、[公開] をクリックします。
    4. [認証情報と基本情報] ページで、Client ID と Client Secret を取得します。
    5. [バージョン管理とリリース] ページでバージョンを作成し、可視範囲を設定して、保存して公開します。
  2. 2

    DingTalk チャネルプラグインをインストールする

    openclaw plugins install @soimy/dingtalk
    openclaw plugins list
    

    出力に、ステータスが loaded の dingtalk プラグインが含まれている必要があります。

  3. 3

    DingTalk チャネルを設定する

    次の設定を ~/.openclaw/openclaw.json に追加します。YOUR_DINGTALK_APPKEY と YOUR_DINGTALK_APPSECRET を手順 1 で取得した認証情報に置き換えます。models や agents などの既存の設定を上書きしないでください。

    {
      "channels": {
        "dingtalk": {
          "enabled": true,
          "clientId": "YOUR_DINGTALK_APPKEY",
          "clientSecret": "YOUR_DINGTALK_APPSECRET",
          "robotCode": "YOUR_DINGTALK_APPKEY",
          "dmPolicy": "open",
          "groupPolicy": "open",
          "messageType": "markdown"
        }
      },
      "plugins": {
        "allow": ["dingtalk"],
        "entries": {
          "dingtalk": {
            "enabled": true
          }
        }
      }
    }
    

    dmPolicy と groupPolicy の両方を open に設定することは、テストや個人利用に適しています。本番環境では allowlist に設定し、allowFrom フィールドを追加します:

    "dmPolicy": "allowlist",
    "groupPolicy": "allowlist",
    "allowFrom": ["your-employee-id", "group-id"]
    
  4. 4

    確認

    openclaw gateway restart
    openclaw status
    

    Channels セクションで、DingTalk が ON で、ステータスが OK - configured になっている必要があります。DingTalk のグループチャットでボットにメッセージを送信して、接続をテストします。

Lark

  1. 1

    Lark アプリケーションを作成する

    1. Lark オープンプラットフォームにアクセスし、[カスタム企業アプリの作成] をクリックして、アプリケーション名と説明を入力し、アイコンを選択して、[作成] をクリックします。
    2. [認証情報と基本情報] ページで、[App ID](cli_xxx の形式)と [App Secret] をコピーします。
    3. [権限管理] ページで、[権限の一括インポート/エクスポート] をクリックし、次の JSON を貼り付けて、[次へ、新しい権限を確認] をクリックし、その後 [有効化を申請] をクリックします。
    {
      "scopes": {
        "tenant": [
          "aily:file:read",
          "aily:file:write",
          "application:application.app_message_stats.overview:readonly",
          "application:application:self_manage",
          "application:bot.menu:write",
          "cardkit:card:write",
          "contact:user.employee_id:readonly",
          "corehr:file:download",
          "docs:document.content:read",
          "event:ip_list",
          "im:chat",
          "im:chat.access_event.bot_p2p_chat:read",
          "im:chat.members:bot_access",
          "im:message",
          "im:message.group_at_msg:readonly",
          "im:message.group_msg",
          "im:message.p2p_msg:readonly",
          "im:message:readonly",
          "im:message:send_as_bot",
          "im:resource",
          "sheets:spreadsheet",
          "wiki:wiki:readonly"
        ],
        "user": ["aily:file:read", "aily:file:write", "im:chat.access_event.bot_p2p_chat:read"]
      }
    }
    
    1. [アプリケーション機能の追加] ページで、[機能別に追加] タブを選択し、[ロボット] カードを見つけて、[設定] をクリックします。
    2. [イベントとコールバック] の [イベント設定] タブで、[サブスクリプション方法] を [長期間有効な接続を使用してイベントを受信] に設定して保存します。次に、イベント im.message.receive_v1 を追加します。
    3. [バージョン管理とリリース] ページでバージョンを作成し、バージョン番号と更新説明を入力して、保存し、レビューと公開のために送信します。
  2. 2

    Lark ボットを設定する

    openclaw channels add を実行し、[Feishu] を選択して、App ID と App Secret を入力します。その後、ゲートウェイを再起動します:

    openclaw gateway restart
    

    ボットを Lark のグループチャットに追加するか、ボットにメッセージを送信します。ボットは [ペアリングコード] を含むメッセージで返信します。最後の行をコピーして OpenClaw のチャットで送信し、ペアリングを完了します。

  3. 3

    確認

    openclaw status
    

    Channels セクションで、Lark が ON で、ステータスが OK になっている必要があります。Lark でメッセージを送信して、接続をテストします。

WeChat

注記WeChat のバージョンが 8.0.70 以降であることを確認してください。

  1. 1

    WeChat チャネルプラグインをインストールする

    npx -y @tencent-weixin/openclaw-weixin-cli@latest install
    

    インストール後、ターミナルに QR コードが表示されます。WeChat でスキャンしてアカウントをリンクします。リンクが完了すると、WeChat で ClawBot とのチャットウィンドウが開きます。

    openclaw plugins list を実行します。出力に、ステータスが loaded の openclaw-weixin プラグインが含まれている必要があります。

  2. 2

    確認

    openclaw gateway restart
    

    WeChat で ClawBot を見つけ、メッセージを送信して接続をテストします。

QQ

  1. 1

    QQ チャネルプラグインをインストールする

    openclaw plugins install @sliverp/qqbot
    openclaw plugins list
    

    出力に、ステータスが loaded の qqbot プラグインが含まれている必要があります。

  2. 2

    QQ ボットを作成する

    1. QQ オープンプラットフォームにアクセスし、開発者アカウントで登録してサインインします。
    2. OpenClaw ページでボットを作成し、AppID と AppSecret を取得します。

    注記AppSecret は平文で保存されず、一度しか表示されません。再度表示するとリセットされるため、安全な場所に保存してください。

  3. 3

    QQ チャネルを設定する

    次の設定を ~/.openclaw/openclaw.json に追加します。YOUR_APP_ID と YOUR_APP_SECRET を手順 2 で取得した認証情報に置き換えます。models や agents などの既存の設定を上書きしないでください。

    {
      "channels": {
        "qqbot": {
          "enabled": true,
          "appId": "YOUR_APP_ID",
          "clientSecret": "YOUR_APP_SECRET",
          "dmPolicy": "open",
          "allowFrom": ["*"]
        }
      },
      "plugins": {
        "allow": ["qqbot"],
        "entries": {
          "qqbot": {
            "enabled": true,
            "config": {}
          }
        }
      }
    }
    

    dmPolicy を open に設定するとダイレクトメッセージが許可され、allowFrom を ["*"] に設定するとすべてのソースからのメッセージが許可されます。これはテストや個人利用に適しています。本番環境では、セキュリティ要件に応じてアクセスを制限してください。

  4. 4

    確認

    openclaw gateway restart
    

    QQ でボットにメッセージを送信して、接続をテストします。

エラーコード

設定中にエラーが発生した場合は、お使いの課金プランの FAQ ドキュメントを参照してください:

FAQ

従量課金で節約プランを使用するには?

従量課金の接続方法は変わりません。Model Studio の汎用 API Key と Base URL を使用します。節約プランを購入すると自動的に有効になり、対象の利用料金が自動的に控除されます。詳細は節約プランをご参照ください。

設定済みのモデルを表示するにはどうすればよいですか?

ターミナルで openclaw tui を入力して OpenClaw のターミナルコマンドラインを起動し、/model を入力してモデル一覧を表示します。Enter キーを押してモデルを選択し、Esc キーで一覧を終了します。

HTTP 401: Incorrect API key provided.、No API key found for provider xxx、または HTTP 401: invalid_iam_token というエラーが表示されるのはなぜですか?

考えられる原因:

  1. API キーが無効、期限切れ、空、形式が正しくない、または誤ったエンドポイント用です。API キーが支払い方法と一致していること、余分なスペースなしで完全にコピーされていること、サブスクリプションが有効であることを確認してください。
  2. OpenClaw が設定キャッシュから誤った古い設定を使用しています。~/.openclaw/agents/main/agent/models.json から providers 設定項目を削除し、OpenClaw を再起動します。
  3. invalid_iam_token は、API キーが IAM 認証に失敗したことを示します。一般的なシナリオには、API キーが取り消されたか無効化されている、API キーのリージョンが Base URL のリージョンと一致しない(たとえば、API キーはシンガポールで作成されたが、Base URL は別のリージョンを指している)、または STS 一時認証情報の有効期限が切れている、などがあります。API キーと Base URL が同じリージョンに属していること、および API キーのステータスが有効であることを確認してください。

DingTalk などの他のチャネルをすでに設定しています。新しいプランのモデルを安全に追加するにはどうすればよいですか?

  • すべて置換機能は使用しないでください。カスタム設定が上書きされます。関連するセクションのみを変更してください。
  • OpenClaw が正常に応答している場合は、OpenClaw のチャットで直接コマンドを入力して設定をマージします。
  • OpenClaw にモデルが設定されていないか応答しない場合は、~/.openclaw/openclaw.json を手動で編集します。関連するフィールドのみを変更し、既存の設定は変更しないでください。

ゲートウェイを再起動した後、既存のセッションが正しく機能しない場合があります。新しいセッションを開始してください。

device identity required エラーが発生した場合はどうすればよいですか?

エラーメッセージ:

http://127.0.0.1:18791/15:05:56 [ws] closed before connect conn=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1008 reason=device identity required

原因:

クライアントがデバイス ID を提供せずにゲートウェイに接続しました。一般的な原因には次のものがあります:

  • ブラウザで初めて URL にアクセスし、デバイスのペアリングが完了していない。
  • ブラウザのキャッシュがクリアされ、デバイスキーが失われた。
  • OpenClaw を再インストールまたはアップグレードした後、~/.openclaw/identity/ ディレクトリのキーファイルが存在しない。

解決策:

次のコマンドを実行して、現在のデバイスを承認し、新しいブラウザアクセス URL を生成します:

openclaw devices approve --latest
openclaw dashboard --no-open

問題が解決しない場合は、異常なデバイスレコードをクリアして再試行します:

openclaw devices clear --pending --yes
openclaw dashboard --no-open

openclaw devices list を実行して、デバイスが Paired リストに表示されることを確認します。

OpenClaw を積極的に使用していなくてもトークンが消費される

原因: OpenClaw にはハートビートメカニズムが組み込まれています。ゲートウェイの実行中は、保留中のタスクを確認するために、設定されたモデルを一定の間隔(デフォルトでは 30 分ごと)で自動的に呼び出します。各ハートビートで少量のトークンが消費されます。

確認方法: ~/.openclaw/agents/main/sessions/ 内のセッションログファイル(.jsonl)を確認します。ハートビート呼び出しには [OpenClaw heartbeat poll] というマークが付きます。

解決策:

  • ゲートウェイを停止する: 使用しない場合は openclaw gateway stop を実行します。これによりハートビートが直ちに停止します。
  • ハートビートの間隔を延ばす: ~/.openclaw/openclaw.json で agents.defaults.heartbeat.every を設定します。たとえば、"2h" に設定すると間隔が 2 時間ごとになります。