Xiaomi MiMo API Integration Guide
💰 Pricing Update (May 27, 2026): MiMo API permanently reduced pricing to $1 per million input tokens and $3 per million output tokens for MiMo-V2.5-Pro — a reduction of up to 99%. Token Plan credits also increased 5-8× at no extra cost.
Quick Start
The MiMo API is OpenAI-compatible. You can integrate it with a simple curl command or the Python OpenAI SDK:
curl https://api.xiaomimimo.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MIMO_API_KEY" \
-d '{
"model": "mimo-v2.5-pro",
"messages": [{"role": "user", "content": "Hello, what can you do?"}],
"temperature": 0.7,
"max_tokens": 1024
}'
1. Authentication
To access the MiMo API, you need an API key from the Xiaomi MiMo Platform:
- Sign up at platform.xiaomimimo.com
- Navigate to API Keys → Create New Key
- Use the key in the
Authorization: Bearer <key>header - New accounts receive $2 in free trial credits (no credit card required)
2. Available Models
| Model ID | Description | Context | Pricing (Input/Output) |
|---|---|---|---|
mimo-v2.5-pro | Flagship agent model, 1T+ params | 1M tokens | $1.00 / $3.00 |
mimo-v2.5-omni | Full-modal (image+video+audio+text) | 128k tokens | $1.50 / $4.00 |
mimo-v2.5-tts | Speech synthesis | — | $2.00 / hour audio |
mimo-v2-flash | MoE flagship, 309B/15B active | 56k tokens | $0.50 / $1.50 |
mimo-7b-instruct | Lightweight reasoning, on-device ready | 32k tokens | $0.15 / $0.45 |
3. Python Integration
Using the OpenAI Python SDK (v1.0+):
from openai import OpenAI
client = OpenAI(
api_key="your-mimo-api-key",
base_url="https://api.xiaomimimo.com/v1"
)
response = client.chat.completions.create(
model="mimo-v2.5-pro",
messages=[
{"role": "system", "content": "You are MiMo, a helpful AI assistant."},
{"role": "user", "content": "Explain MoE architecture in 3 sentences."}
],
temperature=0.7,
max_tokens=512
)
print(response.choices[0].message.content)
4. Token Plan Subscription
The MiMo Token Plan is a subscription bundle designed for AI coding scenarios. It offers high-value credit packages for using MiMo flagship models in popular coding tools:
- Coding-focused: Optimized for developers using MiMo Code, Cursor, Cline, Zed
- Auto-renewal: Supports automatic renewal (enabled from April 2026)
- 5-8× more credits: Recent upgrade increased credits quota without price increase
- Global availability: Available worldwide since May 2026
5. Migration from OpenAI
Migrating from OpenAI to MiMo API requires minimal code changes:
| OpenAI | MiMo |
|---|---|
api.openai.com | api.xiaomimimo.com |
gpt-4o | mimo-v2.5-pro |
gpt-4o-mini | mimo-v2-flash |
| OpenAI SDK | Same SDK, different base_url |
Just change the base_url and model name — the API is fully compatible!
了解更多 MiMo 的编程能力,参见 MiMo Code 编程智能体解读 → 和 MiMo vs DeepSeek 性能对比 →
6. Rate Limits & Best Practices
- Rate limits: Vary by plan tier; Token Plan subscribers get higher limits
- Retry logic: Implement exponential backoff for 429/503 responses
- Streaming: Use
stream: truefor real-time responses - Tool calling: MiMo-V2.5-Pro supports native function calling for agent workflows
7. API Endpoints
| Endpoint | Description |
|---|---|
POST /v1/chat/completions | Chat completions (primary) |
GET /v1/models | List available models |
POST /v1/embeddings | Text embeddings |
🖥️ 推荐 GPU 算力平台
以下平台可用于部署 MiMo 模型推理与微调,新用户注册均有免费额度。