OpenClaw MiniMax API Configuration Guide
Preface: My Pitfall Experience
Hi everyone, I'm zhixun.
Recently I switched OpenClaw's MiniMax API from overseas version to domestic version, and it took me two whole days! The error messages were varied: first `LLM request timed out`, then `HTTP 404: 404 page not found`, and even encountered invalid configuration errors...
I believe many of you have encountered similar issues. Today I'm sharing the complete configuration solution to ensure you can successfully connect after reading this!
Why Choose Domestic MiniMax?
Where Are the Config Files?
This is the first pitfall! OpenClaw has **two** config files that need modification, 99% of people only change the first one:
| Config File | Path | Purpose |
|------------|------|---------|
| Main Config | `~/.openclaw/openclaw.json` | Global config |
| Agent Config | `~/.openclaw/agents/main/agent/models.json` | Current Agent config |
**Key Point**: Change both! Only changing one will cause config to not take effect.
Core Config Modification Steps
Step 1: Modify Main Config File
Open `~/.openclaw/openclaw.json`, find `models.providers.minimax` node, modify the following:
```json
"minimax": {
"baseUrl": "https://api.minimaxi.com/v1",
"apiKey": "your domestic API Key",
"api": "openai-completions",
"authHeader": true,
"models": [...]
}
```
Step 2: Modify Agent Config File
Similarly open `~/.openclaw/agents/main/agent/models.json` and make similar changes.
Key Point: Why Use openai-completions?
This is the biggest pitfall! I initially configured `openai` and kept getting 404 errors.
Reason Analysis
OpenClaw supports limited API formats, it does **not** support `openai`, only:
So domestic MiniMax must use `openai-completions`!
Common Issues & Solutions
Issue 1: HTTP 404 Error
**Solution**: Confirm `api` is set to `openai-completions` and `baseUrl` is `https://api.minimaxi.com/v1`
Issue 2: LLM request timed out
**Solution**: Disable proxy when starting Gateway:
```bash
export no_proxy="*"
export http_proxy=""
export https_proxy=""
~/.nvm/versions/node/v22.22.0/bin/openclaw gateway
```
Summary
Key points for configuring OpenClaw with MiniMax domestic API:
5. Restart Gateway after config changes
Hope this helps! Feel free to leave comments if you encounter other issues.
---
Welcome to leave comments if you have questions!
Zhixun Chen
Solopreneur, sharing learning, trading and AI tools