How to Integrate MiniMax Models in Openclaw

Quick Start
MiniMax provides powerful AI models through OpenAI-compatible endpoints. This guide shows you how to integrate MiniMax M2.5 and other models into Openclaw in under 5 minutes.
If you are new to Openclaw model integrations, you might also want to read about OpenRouter Models for additional provider options.
Option 1: OAuth Setup (Recommended)
The fastest way to get started is using the built-in OAuth plugin. This handles authentication automatically without manual API key configuration.
Step 1: Enable OAuth Plugin
Add the OAuth plugin to your Openclaw configuration and restart the Gateway.
Step 2: Run Onboarding Wizard
Launch the interactive setup:
openclaw onboard --auth-choice minimax-oauth
When prompted, select your endpoint:
- Global (api.minimax.io) for international users
- CN (api.minimaxi.com) for users in China
Option 2: Manual Configuration
For advanced users who prefer direct control, add this to your ~/.openclaw/openclaw.json:
{
"env": { "MINIMAX_API_KEY": "sk-..." },
"agents": {
"defaults": {
"model": { "primary": "minimax/MiniMax-M2.5" }
}
},
"models": {
"mode": "merge",
"providers": {
"minimax": {
"baseUrl": "https://api.minimax.io/anthropic",
"apiKey": "${MINIMAX_API_KEY}",
"api": "anthropic-messages",
"models": [
{
"id": "MiniMax-M2.5",
"name": "MiniMax M2.5",
"reasoning": true,
"input": ["text"],
"contextWindow": 200000
}
]
}
}
}
}
For more deployment options, check out our guide on Flyio Deployment.
Testing Your Setup
Verify the integration works:
openclaw chat --model minimax/MiniMax-M2.5 "Hello, can you confirm you are working?"
Expected response:
{ "status": "success", "model": "minimax/MiniMax-M2.5", "content": "Yes, I am working correctly!" }
Troubleshooting
- 401 Unauthorized: Check your MINIMAX_API_KEY is valid and not expired
- Endpoint errors: Ensure you selected the correct endpoint (Global vs CN) for your region
- Model not found: Verify the model ID is prefixed with minimax/
Best Practices
- Use OAuth for production environments to avoid hardcoding API keys
- Set ~/.openclaw/.env permissions to 600 when using manual config
- Enable reasoning mode for complex coding tasks with M2.5