All Products
Search
Document Center

Alibaba Cloud Model Studio:OpenClaw

Last Updated:Nov 05, 2026

Use Alibaba Cloud Model Studio models in OpenClaw.

Quick Start

  1. 1

    Install the Qwen plugin

    openclaw plugins install @openclaw/qwen-provider
    

    NoteIf the plugin cannot be installed, see Configure with a configuration file.

  2. 2

    Get an API key

    Token Plan

    Get a Token Plan API key for your edition:

    Pay-as-you-go

    Get a Model Studio API key from the Model Studio API key page.

    Coding Plan

    Get a Coding Plan API key from the Coding Plan page.

  3. 3

    Configure the model

    Run the command for your billing plan and enter the API key when prompted.

    Token Plan

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

    Pay-as-you-go

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

    Coding Plan

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

    Verify

    Run the following commands to check the model list and a test call:

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

Configure with a configuration file

Use this method if the Qwen plugin cannot be installed or you prefer to manage the configuration manually.

  1. 1

    Open or create the configuration file

    ~/.openclaw/openclaw.json

    Update only the relevant fields in models, agents, and gateway. Do not replace the entire file.

  2. 2

    Write the configuration

    Token Plan Personal Edition

    Replace YOUR_API_KEY with your Token Plan Personal Edition API key.

    {
      "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": "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 Team Edition

    Replace YOUR_API_KEY with your Token Plan Team Edition API key.

    {
      "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": "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"
        }
      }
    }
    

    Pay-as-you-go

    Replace YOUR_API_KEY with your Model Studio API key, and replace {WorkspaceId} with your Workspace 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

    Replace YOUR_API_KEY with your Coding Plan API key.

    {
      "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"
        }
      }
    }
    

Notegateway.auth.mode: none is suitable only for local single-machine use. To share or access remotely, run openclaw doctor --generate-gateway-token to generate a token, then restart the Gateway.

Connect messaging channels

DingTalk

NoteIf you deploy OpenClaw using Simple Application Server or Elastic Desktop Service, the DingTalk plugin is typically pre-installed and can be configured in the graphical user interface.

  1. 1

    Create a DingTalk application and get credentials

    1. Log in to the DingTalk Open Platform, select an organization for which you have developer permissions, or create an organization and then obtain developer permissions.
    2. In the top menu bar, select Application Development, click Create Application, enter an application name and description, and then click Save.
    3. On the Add Application Capabilities page, add a Bot. Enable Bot Configuration, fill in the required fields, keep the default Stream mode for message receiving mode, and click Publish.
    4. On the Credentials and Basic Information page, get the Client ID and Client Secret.
    5. On the Version Management and Release page, create a version, set the visibility range, save, and publish.
  2. 2

    Install the DingTalk channel plugin

    openclaw plugins install @soimy/dingtalk
    openclaw plugins list
    

    The output should include the dingtalk plugin with a status of loaded.

  3. 3

    Configure the DingTalk channel

    Add the following configurations to ~/.openclaw/openclaw.json. Replace YOUR_DINGTALK_APPKEY and YOUR_DINGTALK_APPSECRET with the credentials from Step 1. Do not overwrite existing configurations such as models and 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
          }
        }
      }
    }
    

    Setting both dmPolicy and groupPolicy to open is suitable for testing or personal use. In a production environment, set them to allowlist and add the allowFrom field:

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

    Verify

    openclaw gateway restart
    openclaw status
    

    In the Channels section, DingTalk should be ON with a status of OK - configured. Send a message to the bot in a DingTalk group chat to test the connection.

Lark

  1. 1

    Create a Lark application

    1. Go to the Lark Open Platform, click Create Custom Enterprise App, enter an application name and description, select an icon, and then click Create.
    2. On the Credentials and Basic Information page, copy the App ID (in the format cli_xxx) and App Secret.
    3. On the Permission Management page, click Batch Import/Export Permissions, paste the following JSON, click Next, Confirm New Permissions, and then click Apply for Activation.
    {
      "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. On the Add Application Capabilities page, select the Add by Capability tab, find the Robot card, and click Configure.
    2. Under Events & Callbacks, on the Event Configuration tab, set Subscription Method to Use long-lived connection to receive events and save. Then add the event im.message.receive_v1.
    3. On the Version Management and Release page, create a version, enter the version number and update description, save, and submit for review and publication.
  2. 2

    Configure the Lark bot

    Run openclaw channels add, select Feishu, and enter the App ID and App Secret. Then restart the gateway:

    openclaw gateway restart
    

    Add the bot to a Lark group chat, or send a message to the bot. The bot replies with a message containing a pairing code. Copy the last line and send it in the OpenClaw chat to complete pairing.

  3. 3

    Verify

    openclaw status
    

    In the Channels section, Lark should be ON with a status of OK. Send a message in Lark to test the connection.

WeChat

NoteEnsure your WeChat version is 8.0.70 or later.

  1. 1

    Install the WeChat channel plugin

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

    After installation, the terminal displays a QR code. Scan it with WeChat to link your account. Once linked, a chat window with ClawBot opens in WeChat.

    Run openclaw plugins list. The output should include the openclaw-weixin plugin with a status of loaded.

  2. 2

    Verify

    openclaw gateway restart
    

    Find ClawBot in WeChat and send it a message to test the connection.

QQ

  1. 1

    Install the QQ channel plugin

    openclaw plugins install @sliverp/qqbot
    openclaw plugins list
    

    The output should include the qqbot plugin with a status of loaded.

  2. 2

    Create a QQ bot

    1. Go to the QQ Open Platform to register and sign in with your developer account.
    2. Create a bot on the OpenClaw page to get an AppID and AppSecret.

    NoteThe AppSecret is not stored in plain text and is shown only once. Viewing it again forces a reset, so save it to a secure location.

  3. 3

    Configure the QQ channel

    Add the following configurations to ~/.openclaw/openclaw.json. Replace YOUR_APP_ID and YOUR_APP_SECRET with the credentials from Step 2. Do not overwrite existing configurations such as models and agents.

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

    Setting dmPolicy to open allows direct messages, and setting allowFrom to ["*"] allows messages from all sources. This is suitable for testing or personal use. In a production environment, restrict access based on your security requirements.

  4. 4

    Verify

    openclaw gateway restart
    

    Send a message to the bot in QQ to test the connection.

Error codes

If you encounter errors during configuration, refer to the FAQ documentation for your billing plan:

FAQ

How do I use a savings plan with pay-as-you-go?

The pay-as-you-go setup remains the same: use your general Model Studio API key and Base URL. After you purchase a savings plan, it takes effect automatically and eligible usage is deducted automatically. See Savings plans.

How can I view my configured models?

Enter openclaw tui in the terminal to start the OpenClaw terminal command line, and then enter /model to view the model list. Press Enter to select a model and Esc to exit the list.

Why do I get the errors HTTP 401: Incorrect API key provided., No API key found for provider xxx, or HTTP 401: invalid_iam_token?

Possible causes:

  1. The API key is invalid, expired, empty, incorrectly formatted, or for the wrong endpoint. Ensure the API key matches your payment method, is copied completely without extra spaces, and that your subscription is active.
  2. OpenClaw is using an incorrect, stale configuration from its configuration cache. Delete the providers configuration item from ~/.openclaw/agents/main/agent/models.json and restart OpenClaw.
  3. invalid_iam_token indicates that the API key failed IAM authentication. Common scenarios include: the API key has been revoked or disabled; the API key's region does not match the Base URL region (for example, the API key was created in Singapore, but the Base URL points to another region); or an STS temporary credential has expired. Verify that the API key and Base URL belong to the same region and that the API key status is active.

I have already configured other channels such as DingTalk. How can I safely add models for a new plan?

  • Do not use a replace-all function. It overwrites custom configurations. Modify only the relevant sections.
  • If OpenClaw is responding normally, enter the commands directly in an OpenClaw chat to merge the configuration.
  • If OpenClaw has no models configured or is not responding, manually edit ~/.openclaw/openclaw.json. Modify only the relevant fields and leave the existing configuration unchanged.

After restarting the gateway, existing sessions may not function correctly. Start a new session.

What should I do if I get a device identity required error?

Error message:

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

Cause:

A client connected to the gateway without providing a device identity. Common causes include:

  • You are accessing the URL in a browser for the first time, and device pairing is not complete.
  • The browser cache was cleared, causing the device key to be lost.
  • After reinstalling or upgrading OpenClaw, the key file in the ~/.openclaw/identity/ directory is missing.

Solution:

Run the following commands to approve the current device and generate a new browser access URL:

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

If the issue persists, clear the abnormal device records and try again:

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

Run openclaw devices list to confirm the device appears in the Paired list.

Token consumption occurs even when OpenClaw is not actively in use

Cause: OpenClaw has a built-in heartbeat mechanism. While the gateway is running, it automatically calls the configured model at a fixed interval (every 30 minutes by default) to check for pending tasks. Each heartbeat consumes a small number of tokens.

How to verify: Check the session log files (.jsonl) in ~/.openclaw/agents/main/sessions/. Heartbeat calls are marked with [OpenClaw heartbeat poll].

Solutions:

  • Stop the gateway: run openclaw gateway stop when not in use. This stops the heartbeat immediately.
  • Increase the heartbeat interval: set agents.defaults.heartbeat.every in ~/.openclaw/openclaw.json. For example, "2h" sets the interval to every 2 hours.