Skip to main content
Connect AI Tools

OpenClaw

Open-source AI assistant platform

OpenClaw lets you interact with AI through various messaging channels. You can configure it to access AI models from QwenCloud. It supports three access methods: pay-as-you-go, Token Plan (Personal Edition), and Token Plan Team Edition.

Quick Start

1

Install the Qwen plugin

openclaw plugins install @openclaw/qwen-provider
If the plugin cannot be installed, see Configure with a configuration file.
2

Get an API key

  • Token Plan
  • Pay-as-you-go
Get a Token Plan API key for your edition:
3

Configure the model

Run the command for your billing plan and enter the API key when prompted.
  • Token Plan
  • Pay-as-you-go
openclaw onboard --auth-choice qwen-token-plan-cn
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

Open or create the configuration file

~/.openclaw/openclaw.jsonUpdate only the relevant fields in models, agents, and gateway. Do not replace the entire file.
2

Write the configuration

  • Token Plan (Personal Edition)
  • Token Plan (Team Edition)
  • Pay-as-you-go
Replace YOUR_API_KEY with your Token Plan (Personal Edition) dedicated API key. For available models, see supported Token Plan (Personal Edition) models.
ParameterValue
API KeyToken Plan (Personal Edition) dedicated API Key
Base URLhttps://token-plan.maas.qwencloudapi.com/apps/anthropic
Available modelsAll models included in the Token Plan (Personal Edition)
{
  "models": {
    "mode": "merge",
    "providers": {
      "qwencloud-token-plan": {
        "baseUrl": "https://token-plan.maas.qwencloudapi.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": "qwencloud-token-plan/auto"
      }
    }
  },
  "gateway": {
    "mode": "local",
    "auth": {
      "mode": "none"
    }
  }
}
gateway.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
  • Lark
  • WeChat
  • QQ
If 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

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

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

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

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.

Error codes

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

FAQ

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.
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.
  • 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.
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.
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.