Free, Unlimited Xiaomi MiMo API
On this page
In this tutorial, you will learn how to add Xiaomi MiMo models into your application for free using Puter.js. The MiMo family includes MiMo-V2.6-Pro, MiMo-V2.6-Pro-UltraSpeed, MiMo-V2.6-Flash, MiMo-V2.5, and MiMo-V2.5-Pro.
Puter.js uses the User-Pays model, where users of your application cover their own AI costs. This means you as a developer don't pay anything for your users' usage, making your app practically free to run. You can scale to unlimited users and pay nothing for the AI or server usage.
Getting Started
To use Puter.js, import our npm module in your project:
// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';
Or alternatively, add our script via CDN if you are working directly with HTML, simply add it to the <head> or <body> section of your code:
<script src="https://js.puter.com/v2/"></script>
That's it, you're ready to start integrating Xiaomi MiMo into your application.
Example 1: Code Generation
MiMo-V2.6-Flash is the cost-efficient model in the MiMo-V2.6 series, suited to everyday coding tasks where you want quick, inexpensive responses.puter.ai.chat(
"Write a TypeScript function that implements a rate limiter using the sliding window algorithm. Include type definitions and comments.",
{ model: "xiaomi/mimo-v2.6-flash" }
)
.then(response => {
puter.print(response);
});
Full code example:
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.chat(
"Write a TypeScript function that implements a rate limiter using the sliding window algorithm. Include type definitions and comments.",
{ model: "xiaomi/mimo-v2.6-flash" }
)
.then(response => {
puter.print(response);
});
</script>
</body>
</html>
Example 2: Agentic Reasoning with MiMo-V2.6-Pro
MiMo-V2.6-Pro is Xiaomi's flagship model, built for complex software engineering and long-horizon agentic workflows. The example below streams both its reasoning and its final answer.<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
async function streamResponse() {
const response = await puter.ai.chat(
`You are a senior backend engineer. I have a REST API with the following endpoints:
- POST /users (create user)
- GET /users/:id (get user)
- PUT /users/:id (update user)
- DELETE /users/:id (delete user)
Design a comprehensive migration plan to convert this to GraphQL, including:
1. Schema definitions with types, queries, and mutations
2. A phased rollout strategy that maintains backward compatibility
3. Resolver implementation patterns with DataLoader for N+1 prevention
4. Testing and monitoring approach for each phase`,
{ model: "xiaomi/mimo-v2.6-pro", stream: true }
);
for await (const part of response) {
if (part?.reasoning) puter.print(part?.reasoning);
else puter.print(part?.text);
}
}
streamResponse();
</script>
</body>
</html>
Example 3: Image Analysis with MiMo-V2.6-Flash
MiMo-V2.6-Flash accepts text, image, video, and audio input in a single model, so you can pass an image URL alongside your prompt.<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<img src="https://assets.puter.site/doge.jpeg" id="image">
<script>
puter.ai.chat(
"What do you see in this image? Describe it in detail.",
"https://assets.puter.site/doge.jpeg",
{ model: 'xiaomi/mimo-v2.6-flash' }
).then(response => {
puter.print(response);
});
</script>
</body>
</html>
Example 4: Low-Latency Chat with MiMo-V2.6-Pro-UltraSpeed
MiMo-V2.6-Pro-UltraSpeed runs the same model as MiMo-V2.6-Pro on a serving path tuned for output speed. Use it for interactive chat where response time matters more than cost per token.<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
async function fastChat() {
const response = await puter.ai.chat(
"Explain the difference between optimistic and pessimistic locking in databases in a few sentences.",
{ model: "xiaomi/mimo-v2.6-pro-ultraspeed", stream: true }
);
for await (const part of response) {
puter.print(part?.text);
}
}
fastChat();
</script>
</body>
</html>
List of Xiaomi MiMo models
You can use the following Xiaomi MiMo models with Puter.js:
xiaomi/mimo-v2.6-pro-ultraspeed
xiaomi/mimo-v2.6-pro
xiaomi/mimo-v2.6-flash
xiaomi/mimo-v2.5
xiaomi/mimo-v2.5-pro
Conclusion
Using Puter.js, you can gain access to Xiaomi MiMo models without having to set up the AI server yourself. And thanks to the User-Pays model, your users cover their own AI usage, not you as the developer. This means you can build powerful applications without worrying about AI usage costs.
You can find all AI features supported by Puter.js in the documentation.
Related
Ship a Full-Stack App with One Prompt
Build an AI chat app using Puter.js
Coding manually? see the guide