Docs · Providers
Xiaomi MiMo Token Plan in Claude Code and Codex
Xiaomi's MiMo platform has a Token Plan and pay as you go. A Token Plan's tp- key works only at its region's own host (China, Singapore or Europe); pay as you go is api.xiaomimimo.com. Each serves Chat Completions, Responses and Anthropic Messages, so Claude Code's, Codex's and OpenCode's requests go as they are, with magpie's local gateway on 127.0.0.1:3425 routing them and holding the key.
Add Xiaomi MiMo
- Add the provider and pick the planOn Providers, click + Add provider, pick Xiaomi MiMo, set the key's plan to Plan · China, Plan · Singapore, Plan · Europe, Pay as you go, paste the key and save.
- Pick it for a toolOn Agents, pick a model such as mimo-v2.6-pro on a tool's row.
magpie claude xiaomi/mimo-v2.6-pro magpie codex xiaomi/mimo-v2.6-pro magpie opencode xiaomi/mimo-v2.6-flash
Regions and endpoints
| Plan | Chat Completions and Responses | Anthropic Messages |
|---|---|---|
| Token Plan · China | https://token-plan-cn.xiaomimimo.com/v1 | https://token-plan-cn.xiaomimimo.com/anthropic |
| Token Plan · Singapore | https://token-plan-sgp.xiaomimimo.com/v1 | https://token-plan-sgp.xiaomimimo.com/anthropic |
| Token Plan · Europe | https://token-plan-ams.xiaomimimo.com/v1 | https://token-plan-ams.xiaomimimo.com/anthropic |
| Pay as you go | https://api.xiaomimimo.com/v1 | https://api.xiaomimimo.com/anthropic |
A Token Plan's tp- key is spent only at the host of the region it was bought in. Each key in the provider names its region, so keys from several regions and pay as you go can share one provider. Plans and their keys are at platform.xiaomimimo.com/token-plan.
Models
Each region names its own catalog: a plan's region lists the plan's models before Xiaomi's public catalog, and pay as you go uses the public one alone. The main chat models are mimo-v2.6-pro, mimo-v2.6-flash, mimo-v2.5-pro and mimo-v2.5. The plan catalogs price their models at $0, which magpie doesn't take as a price, so a pay-as-you-go call is counted at Xiaomi's own prices, not at $0. The model list is read from api.xiaomimimo.com.
In each agent
- Claude Code speaks Anthropic Messages. Each MiMo region has an Anthropic endpoint, so requests go as they are. See Claude Code with other models.
- Codex speaks only OpenAI Responses. Each MiMo region serves Responses, so Codex's requests go as they are. The models show in Codex's
/model. See Codex with other models. - Gemini CLI speaks Gemini's API; magpie points it at the local gateway and translates. See Gemini CLI with other models.
- OpenCode: magpie writes the models into opencode.json. See OpenCode with other models.
The MiMo app subscription
This page is about the platform's API keys. The MiMo app subscription you sign in to with a Xiaomi account (mimo-app) is another thing: it moved out of magpie's built-ins into the community plugin @magpie-community/opencode-mimo-auth; install it from magpie's Plugins page and sign in.
FAQ
How do I use Xiaomi MiMo in Claude Code?
Add Xiaomi MiMo in magpie with your tp- key's region (say Plan · China), then pick mimo-v2.6-pro on Claude Code's row, or run magpie claude xiaomi/mimo-v2.6-pro. Requests go to that region's Anthropic endpoint, such as https://token-plan-cn.xiaomimimo.com/anthropic.
Does a MiMo Token Plan key work in another region?
No. A tp- key is spent only at its own region's host. Set each key's region in magpie; keys from several regions can share one provider.
Does MiMo work in Codex?
Yes. Each MiMo region serves OpenAI Responses, so magpie passes Codex's requests through. Run magpie codex xiaomi/mimo-v2.6-pro.
Can I use the MiMo app subscription too?
Yes, but not in this provider. The MiMo app subscription signed in with a Xiaomi account is served by the community plugin @magpie-community/opencode-mimo-auth; install it from magpie's Plugins page.
The same for other providers: Tencent Cloud, Volcengine Ark, GLM Coding Plan, Kimi, DeepSeek, Qwen. Hit an error? See troubleshooting, or ask on Discord.