MiMo API: Xiaomi's Long-Context AI Models
Xiaomi's current long-context model is MiMo-V2.5-Pro; the direct API model ID
is mimo-v2.5-pro. It exposes a 1M-token context window and a documented 128K
maximum output, with OpenAI- and Anthropic-compatible interfaces.
The model page lists text input and output, deep thinking, tool calls,
streaming, web search, structured output, and prompt caching. Those features
make it a candidate for repository analysis, long-document synthesis, and
agents that need room for tool results.
Direct pay-as-you-go price
Xiaomi publishes both China-region CNY and overseas USD prices. The overseas
figures below were checked on September 11, 2026 and are per 1M tokens:
| Meter | Overseas price |
|---|---|
| Cached input | $0.0036 |
| Uncached input | $0.435 |
| Output | $0.87 |
The China-region prices are ¥0.025, ¥3.00, and ¥6.00 respectively. These are
parallel regional price lists, not values derived by exchange-rate conversion.
Xiaomi currently describes cache writes as temporarily uncharged. “Temporarily”
is an operational warning: keep that meter in your cost model and recheck the
rate page before a large rollout. Web search is billed separately from the
token prices above.
Direct curl request
curl https://api.xiaomimimo.com/v1/chat/completions \
-H "Authorization: Bearer $MIMO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"mimo-v2.5-pro","messages":[{"role":"user","content":"Extract the three decisions in this document."}]}'
Python with an OpenAI client
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["MIMO_API_KEY"],
base_url="https://api.xiaomimimo.com/v1",
)
result = client.chat.completions.create(
model="mimo-v2.5-pro",
messages=[{"role": "user", "content": "Return a JSON migration plan."}],
)
print(result.choices[0].message.content)
When routing through AIWave, use AIWave's catalog ID:
xiaomi/mimo-v2.5-pro. The provider prefix is part of that gateway ID; do not
silently reuse the direct ID. The base URL becomes https://aiwave.live/v1,
and the same OpenAI client structure can be used with an AIWave key.
Check AIWave's dated USD price before calling. Its public rate is the price of
the AIWave route and billing layer, not Xiaomi's direct rate. The operational
value is a common key and invoice across providers; the cost is the gateway
markup and another component to monitor.
Structured output and tool safety
MiMo lists structured output and tool calls, but production readiness depends
on your schema. Test required fields, enums, nested objects, and malformed tool
arguments. Validate every tool call before execution and separate read-only
tools from actions that change external state. If a timeout occurs after an
action may have completed, reconcile the external system before retrying. A
model's tool-call capability does not make the underlying operation
idempotent.
How to spend a million-token window well
Start with a token budget, not a file dump. For a codebase, send the repository
map, relevant interfaces, the current change, and failing evidence. Retrieve
additional files when the model identifies a real dependency. For a document
workflow, separate source text from instructions and reserve enough output for
citations or structured results.
Keep stable material in a deterministic prefix if you expect cache hits. Moving
timestamps or request IDs to the front can invalidate a large cached region.
Log the provider-reported cached input instead of estimating it from repeated
characters.
The public limits also deserve load testing. Xiaomi lists RPM 100 and TPM 10M
for the model, but your account, region, or contract can differ. Run a small
concurrency test, cap retries, and avoid retrying a tool action that has already
changed external state.
For production, store the returned model ID, token usage, latency, HTTP status,
and charge with the request ID. A 1M context window can remove a retrieval step;
it can also create a much larger failure if timeouts and output limits are left
implicit.


Top comments (0)