MiniMax M2.1
API guide
Chat completion
M2.1 uses the standard chat completions endpoint. The model includes interleaved thinking β chain-of-thought reasoning tokens are interleaved with the response. These thinking tokens are not charged separately and are exposed inline in the response.
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax/m2.1",
"messages": [{"role": "user", "content": "Write a Rust function that deduplicates a vector"}]
}'Streaming
M2.1 supports standard server-sent event (SSE) streaming. For agent workflows, streaming reduces perceived latency on the first token.
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax/m2.1",
"messages": [{"role": "user", "content": "Explain the VIBE benchmark"}],
"stream": true
}'Tool use / function calling
M2.1 supports native tool and function calling. Its strong performance on Toolathlon (43.5%) and SWE-bench cross-framework testing makes it well-suited for agentic coding assistants that rely on function calling for file I/O, shell commands, and codebase search.
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax/m2.1",
"messages": [{"role": "user", "content": "Find all pending-review comments in the codebase"}],
"tools": [{
"type": "function",
"function": {
"name": "search_files",
"description": "Search files by pattern",
"parameters": {
"type": "object",
"properties": {
"pattern": {"type": "string", "description": "Search pattern"},
"path": {"type": "string", "description": "Directory to search"}
},
"required": ["pattern"]
}
}
}]
}'Structured output (JSON mode)
M2.1 supports response_format with JSON schema via the OpenAI-compatible API. Use it to enforce structured outputs for downstream automation.
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax/m2.1",
"messages": [{"role": "user", "content": "Generate a test plan for a merge sort function"}],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "test_plan",
"strict": true,
"schema": {
"type": "object",
"properties": {
"test_cases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"input": { "type": "array", "items": { "type": "number" } },
"expected": { "type": "array", "items": { "type": "number" } },
"description": { "type": "string" }
},
"required": ["input", "expected", "description"]
}
}
},
"required": ["test_cases"]
}
}
}
}'Fact ledger β every claim on this page traces here
| source | URL | retrieved | |
|---|---|---|---|
| Release date | www.minimax.io β | 2026-05-27 | verified |
| Architecture | github.com β | 2026-05-27 | verified |
| Training cutoff | β | β | unknown |
| License | huggingface.co β | 2026-05-27 | verified |
| Supported inference backends | github.com β | 2026-05-27 | verified |
| Successor (M2.5) | www.minimax.io β | 2026-05-27 | to verify |
| Latest successor (M2.7) | huggingface.co β | 2026-05-27 | to verify |
| 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 2.0 | github.com β | 2026-05-27 | verified |
| VIBE (Average) | github.com β | 2026-05-27 | verified |
| VIBE-Web | github.com β | 2026-05-27 | verified |
| VIBE-Android | github.com β | 2026-05-27 | verified |
| VIBE-iOS | github.com β | 2026-05-27 | verified |
| VIBE-Simulation | github.com β | 2026-05-27 | verified |
| VIBE-Backend | github.com β | 2026-05-27 | verified |
| Toolathlon | github.com β | 2026-05-27 | verified |
| BrowseComp | 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 |
| SWE-bench Verified (Droid) | github.com β | 2026-05-27 | verified |
| SWE-bench Verified (mini-swe-agent) | github.com β | 2026-05-27 | verified |
| MiniMax M2.1 released β multi-language coding focus | minimax.io/news β | 2026-05-27 | verified |
| Is MiniMax M2.1 free to use for commercial projects? | huggingface.co β | 2026-05-27 | to verify |
| What hardware do I need to run M2.1 locally? | github.com β | 2026-05-27 | to verify |
| Does M2.1 support Interleaved Thinking (chain-of-thought reasoning)? | www.minimax.io β | 2026-05-27 | to verify |
| How does M2.1 compare to Claude Sonnet 4.5 on coding? | github.com β | 2026-05-27 | to verify |