Skip to main content

Installation

Please ensure Node >= 22 before installation.
Run the installation command
npm install -g openclaw@latest

Terminal Configuration

Open the terminal and run the following command to start the configuration
openlaw onboard
Select Yes Oc 1 Select QuickStart Oc 2 Select Skip for now Oc 3 Select All providers Oc 4 Choose the default model as needed; you can initially select Keep current, which can be modified in the configuration file in the next step. Oc 5 Link your personal account as needed; if not required, please select Skip for now. Oc 6 Configure skills by selecting Yes. Oc 7 Select npm Oc 8 Configure skill selection as needed. Oc 9 Select No for all options. Oc 10 Select Skip for now. Oc 11 Select Hatch in UI.

Modify Configuration File

Open the ~/.openclaw/openclaw.json file and add the following configuration:
{
  "models": {
    "mode": "merge",
    "providers": {
      "aihubmix": {
        "baseUrl": "http://aihubmix.com/v1",
        "apiKey": "AIHUBMIX_API_KEY",
        "api": "openai-completions",
        "models": [
          {
            "id": "claude-sonnet-4-5",
            "name": "claude-sonnet-4-5",
            "reasoning": false,
            "input": [
              "text"
            ],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 1000000,
            "maxTokens": 64000
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "aihubmix/claude-sonnet-4-5"
      },
      "workspace": "your_workspace_path",
      "compaction": {
        "mode": "safeguard"
      },
      "maxConcurrent": 4,
      "subagents": {
        "maxConcurrent": 8
      }
    }
  }
}

Start

openclaw gateway

Test

Type hello in the chat page; if you receive a reply, the configuration is successful. Oc 12

Frequently Asked Questions

Version Upgrade

npm update -g openclaw-aihubmix

Gateway Process Occupied

openclaw gateway stop
openclaw gateway