OpenClaw is an open source personal AI assistant platform that lets you interact with AI through various messaging channels. You can configure it to access AI models from Alibaba Cloud Model Studio. It supports four access methods: pay-as-you-go, Coding Plan, Token Plan Personal Edition, and Token Plan Team Edition.
Install OpenClaw
OpenClaw requires Node.js 22.19.0 or later. To check your version:
- macOS / Linux
- Windows
openclaw onboard to configure it manually.
Parameter | Recommendation |
I understand this is powerful and inherently risky. Continue? | Select Yes |
Onboarding mode | Select QuickStart |
Model/auth provider | Select Skip for now (you can configure a Model Studio model later) |
Filter models by provider | Select All providers |
Default model | Select Keep current |
Select channel (QuickStart) | Select Skip for now (you can configure a channel later) |
Configure skills now? (recommended) | Select No |
Enable hooks? | Press the Spacebar to select an option, then press Enter. |
How do you want to hatch your bot? | Select Do this later |
Configure access credentials
Token Plan Personal Edition
Item | Description |
|---|---|
API Key | Dedicated API Key for the Token Plan Personal Edition |
Base URL |
|
Available models | All models included in the Token Plan Personal Edition |
~/.openclaw/openclaw.json. OpenClaw automatically reads this file on startup.
auth.mode: none), suitable only for single-machine local use. For shared or remote access, run openclaw doctor --fix to enable token authentication.YOUR_API_KEY with your API Key for the Token Plan Personal Edition.
For an existing configuration: To preserve your current settings, do not replace the entire file content. See How to safely modify an existing configuration.
Token Plan Team Edition
Item | Description |
|---|---|
API Key | Dedicated API Key for the Token Plan Team Edition |
Base URL |
|
Available models | All models included in the Token Plan Team Edition |
~/.openclaw/openclaw.json. OpenClaw automatically reads this file on startup.
auth.mode: none), suitable only for single-machine local use. For shared or remote access, run openclaw doctor --fix to enable token authentication.- Method 1: Terminal
- Method 2: Web UI
- Open the configuration file
-
Add the configuration
For a new configuration: Copy the following content into the configuration file. Replace
YOUR_API_KEYwith your API Key for the Token Plan Team Edition. For an existing configuration: To preserve your current settings, do not replace the entire file content. See How to safely modify an existing configuration.
-
Save and exit
Press
Ctrl+X, pressYto confirm saving, and then pressEnterto confirm the file name. - Apply the configuration To apply the changes, restart the gateway with the following command:
Coding Plan
Item | Description |
|---|---|
API Key | Dedicated API Key for the Coding Plan, in the format |
Base URL | |
Available models | All models included in the Coding Plan |
~/.openclaw/openclaw.json. OpenClaw automatically reads this file on startup.
auth.mode: none), suitable only for single-machine local use. For shared or remote access, run openclaw doctor --fix to enable token authentication.- Method 1: Terminal
- Method 2: Web UI
- Open the configuration file
-
Add the configuration
For a new configuration: Copy the following content into the configuration file. Replace
YOUR_API_KEYwith your Coding Plan API Key. For an existing configuration: To preserve your current settings, do not replace the entire file content. See How to safely modify an existing configuration.
-
Save and exit
Press
Ctrl+X, pressYto confirm saving, and then pressEnterto confirm the file name. - Apply the configuration To apply the changes, restart the gateway with the following command:
Pay-as-you-go
Item | Description |
|---|---|
API Key | Model Studio API Key, in the format |
Base URL | Ensure your Base URL, API Key, and model all correspond to the same region:
|
Available models | All models available in the Model Market |
~/.openclaw/openclaw.json. OpenClaw automatically reads this file on startup. The following examples use the China (Beijing) region. If you use a different region, replace the baseUrl with the corresponding URL from the table above.
auth.mode: none), suitable only for single-machine local use. For shared or remote access, run openclaw doctor --fix to enable token authentication.- Method 1: Terminal
- Method 2: Web UI
- Open the configuration file
-
Add the configuration
For a new configuration: Copy the following content into the configuration file. Replace
YOUR_API_KEYwith your Model Studio API Key. For an existing configuration: To preserve your current settings, do not replace the entire file content. See How to safely modify an existing configuration.
-
Save and exit
Press
Ctrl+X, pressYto confirm saving, and then pressEnterto confirm the file name. - Apply the configuration To apply the changes, restart the gateway with the following command:
Connect to message channels
DingTalk
Step 1: Create a DingTalk application
-
Select or create an organization
- Log in to the DingTalk Open Platform, select an organization for which you have developer permissions, or select an organization and then obtain developer permissions.
- If you do not have developer permissions, create a new organization. You can use the DingTalk mobile app to scan the QR code below to quickly create one.
-
Create a DingTalk bot application
- Sign in to the DingTalk Open Platform. In the top menu bar, select Application Development.
- Click Create Application. Enter an application name (e.g., "AI Assistant") and description, and then click Save. You will be redirected to the application details page.
- On the Add Application Capabilities page, add a Bot.
-
Configure the bot:
- Enable the Bot Configuration switch.
- Fill in the bot name and other required fields.
- For message receiving mode, keep the default Stream mode.
- Click Publish.
- Get application credentials In the left navigation pane, click Credentials and Basic Information to get the Client ID and Client Secret, which you will need for deployment.
-
Publish the application
- In the left navigation pane of the application details page, click Version Management and Release.
- Click Create New Version and enter a version number, such as 1.0.0.
- Set the visibility range, for example, to Visible only to me.
- Click Save, and then confirm the publication.
Step 2: Install the DingTalk channel plugin
- Install the DingTalk channel plugin:
- Confirm the plugin is loaded:
dingtalk plugin with a status of loaded.
Step 3: Configure the DingTalk channel
channels and plugins.allow configurations to ~/.openclaw/openclaw.json. Replace YOUR_DINGTALK_APPKEY and YOUR_DINGTALK_APPSECRET with the credentials that you obtained in Step 1. Add channels and plugins to the corresponding locations in the existing configuration file, and do not overwrite existing configurations such as models and agents.
dmPolicy and groupPolicy are set to open, which is suitable for testing or personal use. In a production environment, we recommend setting these to allowlist to restrict access to specific users and groups to reduce security risks.
To switch to allowlist mode, change dmPolicy and groupPolicy to "allowlist", and add the allowFrom field with the employee IDs and group IDs that are allowed to access. Example:
Step 4: Test
- Restart the gateway:
- Check the DingTalk channel status:
ON with a status of OK - configured.
3. Find your bot in a DingTalk group chat and send it a message to test the connection.
Lark
Step 1: Create a Lark application
- Go to the Lark Open Platform and click Create Custom Enterprise App. Enter an application name and description, select an application icon, and then click Create.
-
In the left navigation pane, click Credentials and Basic Information and copy the App ID (in the format
cli_xxx) and App Secret. -
In the left navigation pane, click permission management. Click Batch Import/Export Permissions, paste the following JSON configuration, click Next, Confirm New Permissions, and then click Apply for Activation.
JSON Configuration Content
- In the left navigation pane, click Add Application Capabilities, select the Add by Capability tab, find the Robot card, and click Configure.
-
Configure event subscriptions.
- In the left navigation pane of the Lark Open Platform, click Events & Callbacks. On the Event Configuration tab, under Subscription Method, select Use long-lived connection to receive events, and then click Save.
- On the event configuration page, click Add Event, search for the event
im.message.receive_v1(Receive Message), and then click Confirm Add.
- On the Version Management and Release page, create a new version. Enter the Application Version Number and Update Description, click Save, and then submit for review and publish.
Step 2: Configure the Lark bot
- Configure the Lark channel:
- Select Lark.
- Enter the App ID.
- Enter the App Secret.
Step 3: Test
- Restart the gateway:
- Check the Lark channel status:
ON with a status of OK.
3. Send a message in Lark to test.
WeChat
Step 1: Install the WeChat channel plugin
- Install the WeChat channel plugin:
- 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.
- Confirm the plugin is loaded:
openclaw-weixin plugin with a status of loaded.
Step 2: Test
- Restart the gateway:
- In WeChat, find ClawBot and send it a message to test the connection.
QQ
Step 1: Install the QQ channel plugin
- Install the QQ channel plugin:
- Confirm the plugin is loaded:
qqbot plugin with a status of loaded.
Step 2: Create a QQ bot
- Go to the QQ Open Platform to register and sign in with your developer account.
-
Create a bot on the OpenClaw Exclusive Page to get an AppID and AppSecret.
The AppSecret is not stored in plain text and is shown only once. Viewing it again forces a reset, so you must save it to a secure location.
- After creation, a chat window with the bot automatically opens in QQ.
Step 3: Connect to the QQ channel
- Add the
channelsandplugins.allowconfigurations to~/.openclaw/openclaw.json. ReplaceYOUR_APP_IDandYOUR_APP_SECRETwith the credentials that you obtained in Step 2. Add thechannelsandpluginsconfigurations to the corresponding locations in your existing configuration file. Do not overwrite existing configurations, such asmodelsandagents.
dmPolicy to open allows direct messages, and setting allowFrom to ["*"] allows messages from all users. This is suitable for testing or personal use. In a production environment, we recommend restricting access based on your security requirements.
2. After the configuration is complete, restart the gateway.
- In QQ, send a message to the bot to test the connection.
Common commands
Command | Description | Example |
|---|---|---|
/help | Lists available commands. | /help |
/status | Shows the current model, session, and gateway status. | /status |
/model <model_name> | Switches the model for the current session. | /model qwen3.7-max |
/new | Starts a new session. | /new |
/compact | Compresses conversation history to free up context window space. | /compact |
/think <level> | Sets the inference depth. Available levels are off, low, medium, and high. | /think high |
/skills | Lists available skills. | /skills |
Use cases
Use case 1: Schedule AI news pushes
Using OpenClaw's scheduled task feature, you can have an AI automatically fetch news from a specified website and push it to you daily via DingTalk, without needing additional skills or plugins.
Procedure
Procedure
- Complete the DingTalk integration.
- In your terminal:
Parameter | Description |
|---|---|
| The name of the scheduled task. |
| A cron expression. |
| The time zone. Set to |
| The prompt sent to the bot, telling it what content to fetch and how to summarize it. |
| The delivery channel. Set to |
| Pushes the result to the DingTalk conversation. |
| The task timeout in seconds. For web scraping, a value of 120 is recommended. |
- List the scheduled tasks to get the task ID.
- Manually trigger the task.
- Check the execution result.
"status": "ok" and "delivered": true, the news has been successfully pushed to DingTalk.Use case 2: Additional scheduled push templates
Push the latest arXiv papers
Push the latest arXiv papers
agent+evaluation.Push trending HuggingFace models
Push trending HuggingFace models
Push trending GitHub projects
Push trending GitHub projects
Use case 3: Automate Xiaohongshu operations
You can use OpenClaw to automate your Xiaohongshu account for end-to-end tasks such as content creation, automatic posting, and comment replies.
Procedure
Procedure
- Install theXiaohongshu skill In the OpenClaw chat, enter the following instruction to install the skill automatically:
- Restart the gateway to activate the skill.
- Verify the installation:
- You must log in to Xiaohongshu on first use, but re-authentication is not required for subsequent uses. In the OpenClaw chat, enter
Log in to Xiaohongshuand follow the prompts to log in by scanning the QR code.
Example 1: Analyze home feed
Example 1: Analyze home feed
Help me analyze the Xiaohongshu home feed recommendations. OpenClaw will analyze the recommended content and extract reusable topic ideas and title patterns.Example 2: Automatically publish a post
Example 2: Automatically publish a post
Help me publish a Xiaohongshu post about tips for using AI tools. OpenClaw will automatically generate a cover image, fill in the title and body, and publish the post.Example 3: Automatically reply to comments
Example 3: Automatically reply to comments
Help me check the latest Xiaohongshu comments and reply. OpenClaw will automatically check for new comments in your notifications and reply to each one based on your account's persona.Use case 4: Monitor and analyze stocks
OpenClaw can analyze stock trends and provide technical analysis and investment advice.
Procedure
Procedure
- Install ClawHub CLI
- Install the skill In the OpenClaw chat, enter the following instruction to install the skill automatically:
- Restart the gateway to activate the skill.
- In the OpenClaw chat, ask stock-related questions, such as
Analyze the stock price of Kweichow Moutai.
Learn more
Skill
Skills are extensible modules that provide new capabilities. The agent automatically matches and loads the appropriate Skill based on the user's request. OpenClaw allows you to view and enable built-in Skills, install community Skills from ClawHub, or create custom Skills.
Viewing existing skills
- View your installed Skills and their status:
- Built-in Skills are disabled by default. To enable them, you must add them to the
skills.allowBundledallowlist in~/.openclaw/openclaw.json. OpenClaw loads only the built-in Skills listed in this array.
skills.entries field of ~/.openclaw/openclaw.json. For details, refer to the Skills Configuration documentation.
Finding more skills
You can find and install more Skills using one of the following methods.
- Search and install from ClawHub ClawHub offers over 3,000 community Skills. You can browse them on the website or search for them from the command line.
-
Ask OpenClaw directly
Describe your needs directly in the chat, for example,
Help me find a Skill that can check the weather. OpenClaw will automatically search for and install a matching Skill.
Creating a custom skill
- Create a directory for your Skill.
- In this directory, create the
SKILL.mdfile. The file consists of two parts: YAML front matter and Markdown instructions. Thenameanddescriptionfields are required. The Agent uses thedescriptionto determine whether to load the Skill. Ensure that the description is accurate.
- Restart the gateway to apply the Skill.
Connecting to an MCP service
OpenClaw uses Model Context Protocol (MCP) plugins to extend the agent's tool calling capabilities, adding features such as web search and web scraping. For a specific example, see Connect Harness tools.
FAQ
How can I view my configured models?
How can I view my configured models?
openclaw tui in your terminal. 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 error HTTP 401: Incorrect API key provided. , No API key found for provider xxx , or HTTP 401: invalid_iam_token ?
Why do I get the error HTTP 401: Incorrect API key provided. , No API key found for provider xxx , or HTTP 401: invalid_iam_token ?
- The API key might be invalid, expired, empty, incorrectly formatted, or for the wrong endpoint. Ensure the API key corresponds to your payment method, is copied completely without extra spaces, and that your account subscription is active.
- OpenClaw may be using an incorrect, stale configuration from its configuration cache. To resolve this, delete the
providersconfiguration item from the~/.openclaw/agents/main/agent/models.jsonfile and restart OpenClaw. invalid_iam_tokenindicates 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 China (Beijing), but the Base URL points to Singapore); 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 like DingTalk. How can I safely add models for a new plan without losing my existing configuration?
I have already configured other channels like DingTalk. How can I safely add models for a new plan without losing my existing configuration?
- Do not use a "Replace All" function, as this will overwrite your custom configuration. Instead, modify only the relevant sections.
-
Use one of the following methods to complete the configuration:
- 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 the
~/.openclaw/openclaw.jsonfile. Modify only the relevant fields and leave your existing configuration unchanged.
What should I do if I get a device identity required error?
What should I do if I get a device identity required error?
- You are accessing the URL in a browser for the first time, and device pairing is not yet 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.
openclaw devices list to confirm the device appears in the Paired list.Token consumption occurs even when OpenClaw is not actively in use
Token consumption occurs even when OpenClaw is not actively in use
~/.openclaw/agents/main/sessions/ directory. Heartbeat calls are marked with [OpenClaw heartbeat poll].Solutions:- Stop the gateway: Run
openclaw gateway stopwhen not in use. This stops the heartbeat immediately. - Increase the heartbeat interval: Set
agents.defaults.heartbeat.everyin~/.openclaw/openclaw.json. For example,"2h"sets the interval to every 2 hours.