Back to Models
MiniMax M2
minimaxminimax/m2
API guide
Chat completion
Use the standard OpenAI-style chat completion endpoint with minimax/m2 as the model id. The model supports tools and JSON mode via response_format.
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"minimax/m2","messages":[{"role":"user","content":"Write a Python function to merge two sorted arrays."}]}'Streaming
For low-latency agentic workflows, enable streaming. M2's fast TTFB due to 10B-active MoE makes it a strong candidate for interactive coding assistants.
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"minimax/m2","messages":[{"role":"user","content":"Explain Rust ownership in 3 sentences."}],"stream":true}'Tool use (function calling)
M2 natively supports tool/function calling. The model is particularly strong at planning multi-step toolchains β one of its core design goals for agentic workflows.
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"minimax/m2","messages":[{"role":"user","content":"What is the weather in Shanghai?"}],"tools":[{"type":"function","function":{"name":"get_weather","description":"Get current weather","parameters":{"type":"object","properties":{"location":{"type":"string"}},"required":["location"]}}}]}'Fact ledger β every claim on this page traces here
| source | URL | retrieved | |
|---|---|---|---|
| Release date | github.com β | 2026-05-27 | verified |
| Architecture | github.com β | 2026-05-27 | verified |
| Training cutoff | β | β | unknown |
| License | huggingface.co β | 2026-05-27 | to verify |
| Supported inference backends | github.com β | 2026-05-27 | verified |
| Successor (M2.1) | github.com β | 2026-05-27 | verified |
| Latest in family (M2.7) | openrouter.ai β | 2026-05-27 | verified |
| SWE-bench Verified | github.com β | 2026-05-27 | verified |
| Multi-SWE-Bench | github.com β | 2026-05-27 | verified |
| SWE-bench Multilingual | github.com β | 2026-05-27 | verified |
| Terminal-Bench | github.com β | 2026-05-27 | verified |
| BrowseComp | github.com β | 2026-05-27 | verified |
| BrowseComp-zh | github.com β | 2026-05-27 | verified |
| GAIA (text only) | github.com β | 2026-05-27 | verified |
| AIME25 | github.com β | 2026-05-27 | verified |
| MMLU-Pro | github.com β | 2026-05-27 | verified |
| GPQA-Diamond | github.com β | 2026-05-27 | verified |
| ArtifactsBench | github.com β | 2026-05-27 | verified |
| LiveCodeBench (LCB) | github.com β | 2026-05-27 | verified |
| xbench-DeepSearch | github.com β | 2026-05-27 | verified |
| HLE (w/ tools) | github.com β | 2026-05-27 | verified |
| MiniMax open-sources M2 β 230B MoE model built for coding and agentic workflows | github.com/MiniMax-AI β | 2026-05-27 | verified |
| MiniMax M2.1 released β incremental improvements for coding and agents | github.com/MiniMax-AI β | 2026-05-27 | verified |
| Is MiniMax M2 free to use for commercial applications? | huggingface.co β | 2026-05-27 | to verify |
| What context length does M2 support via TheRouter? | openrouter.ai β | 2026-05-27 | to verify |
| How does M2 compare to its successors M2.1, M2.5, and M2.7? | github.com β | 2026-05-27 | to verify |
| Does M2 support vision or image input? | github.com β | 2026-05-27 | to verify |
| Can I self-host MiniMax M2? | docs.vllm.ai β | 2026-05-27 | to verify |