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
Select Yes
Select QuickStart
Select Skip for now
Select All providers
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).
Link your personal account as needed; if not required, please select Skip for now.
Configure skills by selecting Yes.
Select npm
Configure skill selection as needed.
Select No for all options.
Select Skip for now.
Select Hatch in UI.
Method 1: Quick Setup via Plugin (Recommended)
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-openai —
gpt-* / o1-* / o3-* / o4-*, https://aihubmix.com/v1 (openai-completions)
- aihubmix-anthropic —
claude-*, https://aihubmix.com (anthropic-messages)
- aihubmix-google —
gemini-*, 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
Test
Type hello in the chat page; if you receive a reply, the configuration is successful.
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