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
openclaw 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 (if using “Method 2: Manual Configuration”, it 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.

Configure AIHubMix

Plugin source code: aihubmix-auth
Install the AIHubMix auth plugin and restart the Gateway:
openclaw plugins install @akakenle/aihubmix-auth
openclaw gateway restart
Run the auth command. Enter your AIHubMix API Key when prompted. You only need to run the command below once for any one of the four providers — the plugin uses providerAuthAliases to make the same key valid for all transports:
openclaw models auth login --provider aihubmix-openai --method api-key --set-default
The plugin organizes models into the following groups:
  • aihubmix-openaigpt-* / o1-* / o3-* / o4-*, https://aihubmix.com/v1 (openai-completions)
  • aihubmix-anthropicclaude-*, https://aihubmix.com (anthropic-messages)
  • aihubmix-googlegemini-*, https://aihubmix.com/gemini/v1beta (google-generative-ai)
  • aihubmix-other — other models, https://aihubmix.com/v1 (openai-completions)
Shorthand model ids (e.g. claude-sonnet-4-5) are automatically routed to the correct transport by the plugin’s resolveDynamicModel hook — no need to write the full provider/model.
Prefer to skip interactive login? Set export AIHUBMIX_API_KEY=sk-... before installing — the plugin will write the key as an inline apiKey in the provider config (interactive login stores it in the auth-profile instead).
Once configured, jump to the Start section to begin using it.

Method 2: Manual Configuration

Open the ~/.openclaw/openclaw.json file and add the following configuration:
{
  "models": {
    "mode": "merge",
    "providers": {
      "aihubmix-openai": {
        "baseUrl": "https://aihubmix.com/v1",
        "api": "openai-completions",
        "models": [
          {
            "id": "gpt-4o",
            "name": "gpt-4o",
            "reasoning": false,
            "input": ["text"],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 128000,
            "maxTokens": 16384
          }
        ]
      },
      "aihubmix-anthropic": {
        "baseUrl": "https://aihubmix.com",
        "api": "anthropic-messages",
        "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": 200000,
            "maxTokens": 64000
          }
        ]
      },
      "aihubmix-google": {
        "baseUrl": "https://aihubmix.com/gemini/v1beta",
        "api": "google-generative-ai",
        "models": []
      },
      "aihubmix-other": {
        "baseUrl": "https://aihubmix.com/v1",
        "api": "openai-completions",
        "models": []
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "aihubmix-anthropic/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

openclaw plugins update @akakenle/aihubmix-auth
openclaw gateway restart

Gateway Process Occupied

openclaw gateway stop
openclaw gateway

Last updated: 2026-06-01