OpenClaw Configuration
OpenClaw is an open-source personal AI assistant platform that enables interaction with AI through various messaging channels. It can be configured to access AI models on the Token Switch platform.1. Install OpenClaw
OpenClaw requires Node.js version 22.19.0 or higher. You can check the Node.js version using the following command:
node --versionIf it is not installed or the version is too low, please visit the official website of Node.js to download and install it.
Windows install
- Original Windows PowerShell installation. Execute in PowerShell:
iwr -useb https://openclaw.ai/install.ps1 | iex- Or install globally via npm:
npm install -g openclaw@latest- Or through the internal installation within WSL2
<span style="color: rgb(143,149,158); background-color: inherit">First, install WSL2 和 Ubuntu</span> <span style="color: rgb(143,149,158); background-color: inherit">Refer to the official Microsoft website:</span><span style="color: rgb(143,149,158); background-color: inherit">https://learn.microsoft.com/windows/wsl/install</span>
<span style="color: rgb(143,149,158); background-color: inherit">After entering the Ubuntu terminal of WSL, install OpenClaw</span>
curl -fsSL https://openclaw.ai/install.sh | bash- Execute the initialization command
openclaw onboard --install-daemonmacOS install
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon2. Configuration Wizard
After the first installation, OpenClaw will automatically start the configuration wizard to complete the initial setup. Alternatively, you can manually execute the "openclaw onboard" command for configuration.
| Configuration item | Suggested configuration |
|---|---|
| I understand this is powerful and inherently risky. Continue? | Choice Yes |
| Onboarding mode | Choice QuickStart |
| Model/auth provider | Choice Skip for now(Configure the model later) |
| Filter models by provider | Choice All providers |
| Default model | Choice Keep current |
| Select channel (QuickStart) | Choice Skip for now(Configure the channel later) |
| Configure skills now? (recommended) | Choice No |
| Enable hooks? | Press the space bar to select the option, and then press the enter key to proceed to the next step. |
| How do you want to hatch your bot? | Choice Do this later |
3. Configuration Steps
Assuming you have already installed OpenClaw, you need to configure Token Switch as a model provider in OpenClaw. Refer to the steps below:
3.1 方式一:Terminal mode
- Open the configuration file
nano ~/.openclaw/openclaw.json- Write configuration
Initial configuration: Copy the following content to the configuration file and replace "YOUR_API_KEY" with the Token Switch Pro API Key.
Existing configuration: If you wish to retain the existing configuration, please do not perform a complete replacement. For details on how to safely modify the existing configuration, please refer to the relevant section.
{
"meta": {
"lastTouchedVersion": "2026.2.1",
"lastTouchedAt": "2026-02-03T08:20:00.000Z"
},
"models": {
"mode": "merge",
"providers": {
"token-switch": {
"baseUrl": {{apiUrl}},
"apiKey": "YOUR_API_KEY",
"api": "anthropic-messages",
"models": [
{
"id": "qwen3.7-max",
"name": "qwen3.7-max",
"reasoning": false,
"input": ["text"],
"contextWindow": 1000000,
"maxTokens": 65536,
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"compat": { "thinkingFormat": "openai" }
},
{
"id": "MiniMax-M2.5",
"name": "MiniMax-M2.5",
"reasoning": false,
"input": ["text"],
"contextWindow": 204800,
"maxTokens": 131072,
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "qwen3.7-max"
},
"models": {
"qwen3.7-max": {},
}
}
},
"gateway": {
"mode": "local",
"auth": { "mode": "none" }
}
}3.2 方式二:Web UI 方式
If you want to initialize / reset the entire OpenClaw configuration, use the following command:
openclaw onboardIf you want to quickly modify the configuration based on existing settings, use the following command:
openclaw configOn the configuration selection page, select Model:

On the provider selection page, select Custom Provider:

Enter the Token Switch address at BaseURL: https://neolink.com/api/v1

Select to enter the API key now:


If you are adding Claude series models, it is recommended to select Anthropic-compatible
If you are adding GPT, Gemini, Grok, and other series models, it is recommended to select OpenAI-compatible
If you are using other models or unsure about the model endpoint, select Unknown (detect automatically):

Finally, find the desired model in the "Portal / Model Marketplace", click the model card to copy its Model ID, then enter that Model ID back in OpenClaw — a success prompt means the configuration is complete.
4. Common Issues
Bot does not respond in Feishu conversation after configuration
Solution: The OpenClaw BaseURL configuration must include v1: https://neolink.com/api/v1
Returns 400 after entering Model ID for configuration

Cause: OpenClaw sends a verification message to the model to determine its status:
{
"max_completion_tokens": 1,
"messages": [
{"content": "Hi", "role": "user"}
],
"model": "gpt-5.2"
}OpenClaw sets max_completion_tokens=1, some models do not allow such a small value and will directly refuse to generate, returning 400
Solution: Select Change model, use GPT-4o, which has no max_tokens limitation:

If you still want to use the new GPT model, edit the configuration file ~/.openclaw/openclaw.json to directly configure skipping verification:

