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
sourceURLretrieved
Release dategithub.com β†—2026-05-27verified
Architecturegithub.com β†—2026-05-27verified
Training cutoffβ€”β€”unknown
Licensehuggingface.co β†—2026-05-27to verify
Supported inference backendsgithub.com β†—2026-05-27verified
Successor (M2.1)github.com β†—2026-05-27verified
Latest in family (M2.7)openrouter.ai β†—2026-05-27verified
SWE-bench Verifiedgithub.com β†—2026-05-27verified
Multi-SWE-Benchgithub.com β†—2026-05-27verified
SWE-bench Multilingualgithub.com β†—2026-05-27verified
Terminal-Benchgithub.com β†—2026-05-27verified
BrowseCompgithub.com β†—2026-05-27verified
BrowseComp-zhgithub.com β†—2026-05-27verified
GAIA (text only)github.com β†—2026-05-27verified
AIME25github.com β†—2026-05-27verified
MMLU-Progithub.com β†—2026-05-27verified
GPQA-Diamondgithub.com β†—2026-05-27verified
ArtifactsBenchgithub.com β†—2026-05-27verified
LiveCodeBench (LCB)github.com β†—2026-05-27verified
xbench-DeepSearchgithub.com β†—2026-05-27verified
HLE (w/ tools)github.com β†—2026-05-27verified
MiniMax open-sources M2 β€” 230B MoE model built for coding and agentic workflowsgithub.com/MiniMax-AI β†—2026-05-27verified
MiniMax M2.1 released β€” incremental improvements for coding and agentsgithub.com/MiniMax-AI β†—2026-05-27verified
Is MiniMax M2 free to use for commercial applications?huggingface.co β†—2026-05-27to verify
What context length does M2 support via TheRouter?openrouter.ai β†—2026-05-27to verify
How does M2 compare to its successors M2.1, M2.5, and M2.7?github.com β†—2026-05-27to verify
Does M2 support vision or image input?github.com β†—2026-05-27to verify
Can I self-host MiniMax M2?docs.vllm.ai β†—2026-05-27to verify
Help & contact