OpenClaw
During software development, developers often struggle with slow coding and complex debugging. OpenClaw is an AI programming tool that helps developers write and debug code efficiently using large models. However, quickly adding these advanced AI capabilities to existing development environments has become a new challenge. You can easily connect MaaS model APIs to OpenClaw using simple settings to quickly integrate API capabilities and improve your development speed. This document aims to help developers efficiently and securely integrate MaaS model APIs into the OpenClaw environment.
Prerequisites
- You have registered a Huawei Cloud account. For details, see Signing Up for a Huawei Cloud Account.
- You have subscribed to built-in services or created an endpoint. For details, see Subscribing to Built-in Services and Creating an Endpoint.
Billing
When using the MaaS service, you are charged based on the number of tokens used. For details, see MaaS Text Generation Models.
Constraints
This function is only supported in the CN-Hong Kong region.
Step 1: Install OpenClaw
Install OpenClaw on Windows, macOS, or Linux.
- Install Node.js 22 or later.
node --version # Run this command to verify the Node.js version.
- Open the command-line interface and run the following command to install OpenClaw:
iwr -useb https://openclaw.ai/install.ps1 | iex
Or install it globally using npm:
npm install -g openclaw@latest
- Install Node.js 22 or later.
node --version # Run this command to verify the Node.js version.
- Install OpenClaw.
curl -fsSL https://openclaw.ai/install.sh | bash
Or install it globally using npm:
npm install -g openclaw@latest
Step 2: Complete Initial Configuration
| Type | Parameter | Example |
|---|---|---|
| Basic settings | I understand this is personal-by-default and shared/multi-user use requires lock-down. Continue? | Select Yes. |
| Setup mode | Select QuickStart. | |
| Model settings | Model/auth provider | Select Skip for now to configure it later. |
| Filter models by provider | Select All providers. | |
| Default model | Keep the default settings. | |
| Function configurations | Select channel (QuickStart) | Select Skip for now to configure it later. |
| Search provider | Select Skip for now to configure it later. | |
| Configure skills now? (recommended) | Select No to configure it later. | |
| Enable hooks? | Press the spacebar, select Skip for now, and press Enter to go to the next step. | |
| How do you want to hatch your bot? | Select Hatch in TUI. |
Step 3: Access MaaS Model APIs in OpenClaw
- Run the following command on the terminal to open the OpenClaw Web UI:
openclaw dashboard
- In the navigation pane of the Web UI, choose to view and modify the configuration.
Table 2 Parameter description Parameter
Description
baseUrl
https://api-ap-southeast-1.modelarts-maas.com/v2
apiKey
models
For details about the supported models and their parameter values, see Supported Models.
- Initial configuration: Copy the following content to the Raw JSON5 text box to replace the existing content.
{ "models": { "providers": { "hw-maas-pan": { "baseUrl": "https://api-ap-southeast-1.modelarts-maas.com/v2", "apiKey": "<API_KEY>", "api": "openai-completions", "models": [ { "id": "glm-5.2", "name": "glm-5.2", "contextWindow": 64000, "maxTokens": 64000, "input": [ "text" ] }, { "id": "deepseek-v4-flash", "name": "deepseek-v4-flash", "contextWindow": 96000, "maxTokens": 96000, "input": [ "text" ] } ] } } }, "agents": { "defaults": { "model": { "primary": "hw-maas-pan/glm-5.2" }, "models": { "hw-maas-pan/glm-5.2": {}, "hw-maas-pan/deepseek-v4-flash": {} } } }, "gateway": { "mode": "local" } } - Existing configuration: If you have configured OpenClaw, do not overwrite the original configuration. You are advised to update the information about the models, agents, and gateway nodes based on the provided configuration. The models node contains the list of supported models.
- Initial configuration: Copy the following content to the Raw JSON5 text box to replace the existing content.
- After the configuration is complete, click Save in the upper right corner to save the configuration, and then click Update for the configuration to take effect.
After the configuration is saved, the API key is displayed as __OPENCLAW_REDACTED__. This is used only for hiding on the frontend interface and does not affect the actual calling.
- Edit the openclaw.json configuration file on the terminal.
cat ~/.openclaw/openclaw.json
- Modify the configuration according to the following table.
Table 3 Parameter settings Parameter
Description
baseUrl
https://api-ap-southeast-1.modelarts-maas.com/v2
apiKey
models
For details about the supported models and their parameter values, see Supported Models.
- Initial configuration: Copy the following content to the configuration file.
{ "models": { "providers": { "hw-maas-pan": { "baseUrl": "https://api-ap-southeast-1.modelarts-maas.com/v2", "apiKey": "<API_KEY>", "api": "openai-completions", "models": [ { "id": "glm-5.2", "name": "glm-5.2", "contextWindow": 64000, "maxTokens": 64000, "input": [ "text" ] }, { "id": "deepseek-v4-flash", "name": "deepseek-v4-flash", "contextWindow": 96000, "maxTokens": 96000, "input": [ "text" ] } ] } } }, "agents": { "defaults": { "model": { "primary": "hw-maas-pan/glm-5.2" }, "models": { "hw-maas-pan/glm-5.2": {}, "hw-maas-pan/deepseek-v4-flash": {} } } }, "gateway": { "mode": "local" } } - Existing configuration: If you have configured OpenClaw, do not overwrite the original configuration. You are advised to update the information about the models, agents, and gateway nodes based on the provided configuration. The models node contains the list of supported models.
- Initial configuration: Copy the following content to the configuration file.
- Save the file and exit. Run the following command to make the configuration take effect:
openclaw gateway restart
Step 4: Use OpenClaw
- You can use OpenClaw in either of the following ways:
- WebUI
Open a new terminal and run the following command. The browser automatically opens the OpenClaw Web UI, where you can start a conversation.
openclaw dashboard
- TUI
Open a new terminal and run the following command to access the TUI and start a conversation:
openclaw tui
- WebUI
- Switch to another model.
- Switch to another model in the current session (temporarily)
Enter openclaw tui on the terminal to access the TUI. Use /model <Model name > to switch to another model in the current session.
/model hw-maas-pan/glm-5.2
If the message "model set to <Model name>" is displayed, the new model is now used.
- Switch to the default model (permanently)
To use a specified model in each new session, change the agents.defaults.model.primary field to the target model. For details, see Step 2: Complete the initial configuration.
{ "agents": { "defaults": { "model": { "primary": "hw-maas-pan/glm-5.2" } } } }
- Switch to another model in the current session (temporarily)
- Start a dialog in OpenClaw.
FAQs
- How do I enable deep thinking in OpenClaw?
OpenClaw supports the following deep thinking levels: off, minimal, low, medium, high, and xhigh. For details, see Thinking Levels.
There are three methods for enabling deep thinking:
Method 1: Add an inline command /think:<level> or /t <level> before the message.
/think:high Your question # Or use the abbreviated mode. /t high Your question
Method 2: Enable deep thinking at the session level by sending a separate command /think:<level> or /t <level>./think:high # Or use the abbreviated mode. /t high
Method 3: Enable deep thinking in global settings. Run the following command to modify the global setting: openclaw config set agents.defaults.thinkingDefault <level>.openclaw config set agents.defaults.thinkingDefault high # Restart the gateway for the setting to take effect. openclaw gateway restart # Check whether the configuration has taken effect: openclaw config get agents.defaults.thinkingDefault
- What should I do if the message "Gateway service disabled" is displayed after I run the openclaw gateway restart command?
Run openclaw gateway to manually start the gateway service. If the service is started successfully, the following information is displayed:
openclaw gateway

What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
