How to Set Up MiMo for OpenCode, Claude Code, and OpenClaw
If you searched for MiMo Claude Code, MiMo OpenCode, or MiMo OpenClaw Token Plan, the most important thing is not the model label. It is the route. `sk-` PAYG keys and `tp-` Token Plan keys are different credentials on different endpoints, and OpenClaw still treats those routes differently.
- MiMo setup problems usually come from billing-route mistakes, not model-name mistakes.
- PAYG uses `sk-` keys and Token Plan uses `tp-` keys, with different endpoints.
- OpenClaw has a smoother official path for PAYG than it does for Token Plan.
Before you copy a MiMo endpoint, identify the billing route
MiMo is one of the clearest examples of why route comes before model name. The same model can sit behind different key prefixes, different endpoints, and different onboarding behavior depending on whether you are using PAYG or Token Plan.
That is why a good MiMo setup article starts with `sk-` vs `tp-`, OpenAI-compatible vs Anthropic-compatible, and only then moves into OpenCode, Claude Code, or OpenClaw. Skip that step and readers usually end up debugging a valid key on the wrong route.
Which MiMo doc covers which setup question
| Workflow | Official coverage | What it confirms | Main risk |
|---|---|---|---|
| OpenCode | Dedicated official page | Which base URL belongs to PAYG vs Token Plan | Using a Token Plan key on the PAYG endpoint |
| Claude Code | Dedicated official page | Which Anthropic-compatible endpoint belongs to each route | Leaving old Anthropic variables in place |
| OpenClaw | Dedicated official page | PAYG has a preset Xiaomi provider, Token Plan still needs a manual provider block | Telling readers both routes are equally one-click |
| Tools overview | Dedicated official page | Which compatible tools MiMo officially covers | Assuming every compatible tool also has a deep standalone tutorial |
OpenCode, Claude Code, and OpenClaw quick setup
OpenCode
PAYG uses `https://api.xiaomimimo.com/v1`. Token Plan uses `https://token-plan-cn.xiaomimimo.com/v1`. In both cases, the common model name is `mimo-v2-pro`.
Claude Code
PAYG uses `https://api.xiaomimimo.com/anthropic`. Token Plan uses `https://token-plan-cn.xiaomimimo.com/anthropic`. The most common failure is mixing `sk-` and `tp-` keys.
OpenClaw
PAYG can use the preset Xiaomi provider. Token Plan still needs a manual provider block in `~/.openclaw/openclaw.json`, which is why those two routes should never be described as equally automatic.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"mimo": {
"npm": "@ai-sdk/openai-compatible",
"name": "MiMo",
"options": {
"baseURL": "BASE_URL",
"apiKey": "MIMO_API_KEY"
},
"models": {
"mimo-v2-pro": {
"name": "MiMo-V2-Pro"
}
}
}
}
}{
"env": {
"ANTHROPIC_BASE_URL": "https://api.xiaomimimo.com/anthropic",
"ANTHROPIC_AUTH_TOKEN": "sk-xxxxx",
"ANTHROPIC_MODEL": "mimo-v2-pro",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "mimo-v2-pro",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "mimo-v2-pro"
}
}{
"models": {
"providers": {
"xiaomi-coding": {
"baseUrl": "https://token-plan-cn.xiaomimimo.com/v1",
"apiKey": "tp-xxxxx",
"api": "openai-completions"
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "xiaomi-coding/mimo-v2-pro"
}
}
}
}The mistakes that matter most
- Treating `sk-` and `tp-` as interchangeable.
- Treating OpenAI-compatible and Anthropic-compatible endpoints as interchangeable.
- Writing “MiMo OpenClaw is one-click” without separating PAYG and Token Plan.
- Starting from the model name instead of from the billing path.
For MiMo, route clarity is more important than config density
Once PAYG vs Token Plan is clear, the rest of the setup usually becomes straightforward.
Sources and official links
Frequently asked questions
Does MiMo have official pages for OpenCode, Claude Code, and OpenClaw?
Yes. Those are all covered in official MiMo docs, with the strongest route details in the dedicated integration pages.
Can MiMo Token Plan use the same one-click OpenClaw flow as PAYG?
No. The public docs explicitly distinguish the two. PAYG has a preset Xiaomi provider, while Token Plan still needs a manual provider block.
What is the single most important warning in a MiMo setup article?
Explain the billing route before the model. That prevents most of the real setup mistakes.