🤖 AI Tools
· 6 min read

How to Use MiMo V2.5 Pro with Claude Code: Setup Guide (2026)


Xiaomi’s official documentation recommends Claude Code as a harness for MiMo V2.5 Pro. That is not a casual suggestion. V2.5 Pro was trained with agentic coding harnesses in mind, and Claude Code is the one it works best with.

This guide walks you through the full setup, from API key to first prompt.

Why Use MiMo V2.5 Pro with Claude Code

The short answer: you get 90%+ of Opus-level coding performance at a fraction of the cost.

V2.5 Pro uses 40-60% fewer tokens than Claude Opus to complete the same tasks. It does this through tighter reasoning chains and fewer redundant tool calls. The model was specifically optimized for multi-step agentic workflows where token efficiency matters.

The pricing difference is significant:

ModelInput (per 1M tokens)Output (per 1M tokens)Typical cost for 1hr coding session
MiMo V2.5 Pro$1.00$3.00~$0.40-0.80
Claude Opus$15.00$75.00~$8.00-15.00

V2.5 Pro also supports 1,000+ sequential tool calls in a single session. That matters for large refactors, multi-file edits, and long debugging chains where Claude Code needs to read, edit, test, and iterate across dozens of files.

Prerequisites

You need two things before starting:

  1. Claude Code installed and working. If you have not set it up yet, follow our Claude Code guide. Make sure you can run claude in your terminal and get a response.

  2. A MiMo API key. Sign up at platform.xiaomimimo.com and generate an API key. The free tier gives you enough credits to test the setup. Keep the key somewhere safe.

You should also have Node.js 18+ and a recent version of Claude Code (v1.0.0 or later).

Setup Steps

Step 1: Set Your API Key

Export your MiMo API key as an environment variable:

export MIMO_API_KEY="your-api-key-here"

Add this to your .bashrc, .zshrc, or shell profile so it persists across sessions.

Step 2: Configure Claude Code to Use MiMo V2.5 Pro

Run the following commands to point Claude Code at the MiMo backend:

claude config set model mimo-v2.5-pro
claude config set apiBaseUrl https://api.xiaomimimo.com/v1
claude config set apiKey $MIMO_API_KEY

This tells Claude Code to route all requests through the MiMo API instead of Anthropic’s servers.

Step 3: Verify the Connection

Run a quick test to confirm everything works:

claude "What model are you?"

You should see a response identifying MiMo V2.5 Pro. If you get an authentication error, double-check your API key. If you get a connection error, verify the base URL has no trailing slash.

Step 4: Set Up for a Project

Navigate to your project directory and start a session:

cd your-project
claude

V2.5 Pro will now handle all tool calls, file reads, edits, and command execution through the Claude Code interface. The experience is identical to using native Claude, but the backend model is different.

Configuration Tips

Temperature

V2.5 Pro defaults to temperature 0.6 for coding tasks. You can lower it for more deterministic output:

claude config set temperature 0.3

For exploratory work or brainstorming, leave it at the default or bump it to 0.7.

Context Management for Long Sessions

V2.5 Pro handles long contexts well, but you will get better results if you help it stay focused. A few practical tips:

  • Use /compact regularly during long sessions to summarize and compress the conversation history. Check the Claude Code cheat sheet for more commands.
  • Break large tasks into smaller prompts rather than one massive instruction.
  • When switching between unrelated tasks, start a new session with claude rather than continuing in the same one.

Custom Instructions

You can add a CLAUDE.md file to your project root with project-specific instructions. V2.5 Pro reads and follows these just like native Claude does:

# CLAUDE.md
- Use TypeScript strict mode
- Run tests with `npm run test` before committing
- Follow the existing code style in src/

Also Works with OpenCode and Kilo

Claude Code is the recommended harness, but V2.5 Pro also works with other agentic coding tools:

  • OpenCode: Set the provider to mimo and add your API key in the OpenCode config file. The setup is similar to the Aider configuration for MiMo V2 Pro.
  • Kilo: Point the base URL to https://api.xiaomimimo.com/v1 and select mimo-v2.5-pro as the model.

Both tools support the OpenAI-compatible API format that MiMo uses. Claude Code remains the best option because V2.5 Pro was specifically tuned for its tool-calling patterns.

Comparison: V2.5 Pro vs Native Opus in Claude Code

Here is how the two models compare when used through Claude Code on real coding tasks:

MetricMiMo V2.5 ProClaude Opus
SWE-bench Verified70.1%72.0%
Avg tokens per task~12,000~28,000
Tool calls per session (max)1,000+~200
Input price (per 1M)$1.00$15.00
Output price (per 1M)$3.00$75.00
Context window128K200K
Long session stabilityExcellentGood
Multi-file refactorsStrongStrong

The SWE-bench gap is small. The cost gap is massive. For most day-to-day coding work, V2.5 Pro through Claude Code is the better value. Opus still has an edge on tasks requiring very deep reasoning or extremely large context windows.

The “Harness Awareness” Advantage

This is what makes V2.5 Pro different from just plugging any cheap model into Claude Code.

V2.5 Pro was trained with awareness of how agentic harnesses like Claude Code work. It understands the tool-calling protocol, knows when to batch file reads vs. making sequential calls, and actively manages its own context window usage.

In practice, this means:

  • It avoids re-reading files it has already seen in the current session.
  • It batches related edits into fewer tool calls instead of making one call per line change.
  • It proactively summarizes its own progress to keep the context window clean.
  • It knows when to ask for clarification vs. when to proceed with reasonable assumptions.

This is similar to what we saw with GLM-5.1 in Claude Code, but V2.5 Pro takes it further. The model was explicitly fine-tuned on traces from Claude Code sessions, so it knows the harness intimately.

FAQ

Can I switch between MiMo V2.5 Pro and Claude Opus mid-session?

Not within the same session. You need to exit Claude Code, change the model config, and start a new session. Some users keep two shell aliases: one for claude-mimo and one for claude-opus, each with different config paths.

Does V2.5 Pro support Claude Code’s vision features?

Yes. V2.5 Pro is multimodal and handles image inputs through Claude Code. You can paste screenshots, share diagrams, or reference image files in your project. Performance on vision tasks is comparable to Sonnet, though not quite at Opus level.

What if I hit rate limits on the MiMo API?

The free tier has conservative rate limits. Upgrade to a paid plan on platform.xiaomimimo.com for higher throughput. Paid plans start at $10/month and include enough capacity for full-time coding use. If you are hitting limits on the paid tier, contact MiMo support to request a limit increase.

Wrapping Up

MiMo V2.5 Pro through Claude Code is one of the best cost-performance setups for AI-assisted coding right now. The setup takes five minutes, the savings are immediate, and the quality gap with Opus is small enough that most developers will not notice it in daily work.

Get your API key from platform.xiaomimimo.com, follow the steps above, and try it on your next project.