Back to Models

MiniMax M2.1

minimaxminimax/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
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
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
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
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
sourceURLretrieved
Release datewww.minimax.io β†—2026-05-27verified
Architecturegithub.com β†—2026-05-27verified
Training cutoffβ€”β€”unknown
Licensehuggingface.co β†—2026-05-27verified
Supported inference backendsgithub.com β†—2026-05-27verified
Successor (M2.5)www.minimax.io β†—2026-05-27to verify
Latest successor (M2.7)huggingface.co β†—2026-05-27to verify
SWE-bench Verifiedgithub.com β†—2026-05-27verified
Multi-SWE-benchgithub.com β†—2026-05-27verified
SWE-bench Multilingualgithub.com β†—2026-05-27verified
Terminal-bench 2.0github.com β†—2026-05-27verified
VIBE (Average)github.com β†—2026-05-27verified
VIBE-Webgithub.com β†—2026-05-27verified
VIBE-Androidgithub.com β†—2026-05-27verified
VIBE-iOSgithub.com β†—2026-05-27verified
VIBE-Simulationgithub.com β†—2026-05-27verified
VIBE-Backendgithub.com β†—2026-05-27verified
Toolathlongithub.com β†—2026-05-27verified
BrowseCompgithub.com β†—2026-05-27verified
AIME25github.com β†—2026-05-27verified
MMLU-Progithub.com β†—2026-05-27verified
GPQA-Diamondgithub.com β†—2026-05-27verified
SWE-bench Verified (Droid)github.com β†—2026-05-27verified
SWE-bench Verified (mini-swe-agent)github.com β†—2026-05-27verified
MiniMax M2.1 released β€” multi-language coding focusminimax.io/news β†—2026-05-27verified
Is MiniMax M2.1 free to use for commercial projects?huggingface.co β†—2026-05-27to verify
What hardware do I need to run M2.1 locally?github.com β†—2026-05-27to verify
Does M2.1 support Interleaved Thinking (chain-of-thought reasoning)?www.minimax.io β†—2026-05-27to verify
How does M2.1 compare to Claude Sonnet 4.5 on coding?github.com β†—2026-05-27to verify
Help & contact