MiniMax M2.1: Self-Hosting & Deployment Guide
MiniMax M2.1 is a second-generation, open-weight Mixture-of-Experts large language model from MiniMax, optimized for real-world coding, tool use, and long-horizon agentic workflows.
What is MiniMax M2.1?
MiniMax M2.1 is a large language model by MiniMax designed as an enhanced successor to M2, with a focus on coding accuracy, tool use, and long-horizon planning. It is mainly used for software development tasks such as multi-language code generation, refactoring, debugging, and automated code review, and for agentic workflows that require reliable tool invocation and handling of long, multi-step instructions. The model belongs to the MiniMax M2 series of Mixture-of-Experts language models, evolving from earlier MiniMax models like M1 and M2 within the same family.
How to run MiniMax M2.1 yourself
Open weights (other), 228.7B parameters. Below: how much memory the weights need at each quantization, which hardware fits them, and the commands to serve it.
MiniMax M2.1 VRAM requirements
| Precision / quantization | Weights | Figure | Source |
|---|---|---|---|
| BF16 (full precision) | 457.4 GB | Estimate | 228.7B params × 2 bytes |
| AWQ 4-bit | 124.9 GB | File size | QuantTrio/MiniMax-M2.1-AWQ |
| MLX 4-bit | 128.7 GB | File size | mlx-community/MiniMax-M2.1-4bit |
| GGUF Q8_0 | 243.1 GB | File size | unsloth/MiniMax-M2.1-GGUF |
| GGUF Q4_K_M | 138.3 GB | File size | unsloth/MiniMax-M2.1-GGUF |
| GGUF Q2_K | 83.3 GB | File size | unsloth/MiniMax-M2.1-GGUF |
File size = actual download size on Hugging Face. Estimate = parameter count × bytes per weight. Weights only — the KV cache for long contexts needs extra memory; the fit tables below add 15% headroom as a rule of thumb.
GPU requirements: deploy MiniMax M2.1 on your hardware
| Hardware | BF16 (full precision) | AWQ 4-bit | MLX 4-bit | GGUF Q8_0 | GGUF Q4_K_M | GGUF Q2_K |
|---|---|---|---|---|---|---|
| NVIDIA H200141 GB | 4× | 2× | 2× | 2× | 2× | 1× |
| NVIDIA H10080 GB | 7× | 2× | 2× | 4× | 2× | 2× |
| NVIDIA A100 80GB80 GB | 7× | 2× | 2× | 4× | 2× | 2× |
| NVIDIA L40S48 GB | — | 3× | 4× | 6× | 4× | 2× |
GPUs needed per variant.
| Hardware | GGUF Q8_0 | GGUF Q4_K_M | GGUF Q2_K |
|---|---|---|---|
| RTX 509032 GB | — | 5× | 3× |
| RTX 409024 GB | — | 7× | 4× |
| RTX 309024 GB | — | 7× | 4× |
GGUF via llama.cpp; more cards or CPU offload for larger files.
| Hardware | GGUF Q8_0 | GGUF Q4_K_M | GGUF Q2_K | MLX 4-bit |
|---|---|---|---|---|
| Mac, 512 GBM3 Ultra | Fits | Fits | Fits | Fits |
| Mac, 192 GBM2 Ultra | — | — | Fits | — |
| Mac, 128 GBM4 Max / M3 Max | — | — | Fits | — |
| Mac, 64 GBM4 Pro / Max | — | — | — | — |
Assumes ~75% of unified memory is usable by the GPU.
| Hardware | BF16 (full precision) | AWQ 4-bit | MLX 4-bit | GGUF Q8_0 | GGUF Q4_K_M | GGUF Q2_K |
|---|---|---|---|---|---|---|
| AWS p5.48xlarge8× H100 · 640 GB | Fits | Fits | Fits | Fits | Fits | Fits |
| AWS p4de.24xlarge8× A100 80GB · 640 GB | Fits | Fits | Fits | Fits | Fits | Fits |
| AWS g6e.12xlarge4× L40S · 192 GB | — | Fits | Fits | — | Fits | Fits |
| Google Cloud a3-highgpu-8g8× H100 · 640 GB | Fits | Fits | Fits | Fits | Fits | Fits |
| Azure ND H100 v58× H100 · 640 GB | Fits | Fits | Fits | Fits | Fits | Fits |
Whole-instance GPU memory; public instance specs.
Serve it yourself
pip install -U vllm
vllm serve MiniMaxAI/MiniMax-M2.1pip install 'sglang[all]'
python -m sglang.launch_server --model-path MiniMaxAI/MiniMax-M2.1llama-server -hf unsloth/MiniMax-M2.1-GGUF:Q4_K_M \
--ctx-size 32768 --n-gpu-layers 99pip install -U mlx-lm
mlx_lm.generate --model mlx-community/MiniMax-M2.1-4bit --prompt "Hello"Commands use the official repositories above; vLLM and SGLang expose an OpenAI-compatible endpoint.
Skip the deploy — use LLM.API as your endpoint
No GPUs, no quantization trade-offs. Same model, OpenAI-compatible, up to 30% below list price.
Providers
Different companies host the same model. OpenRouter routes your request to one of them based on the routing mode you pick — Balanced (price + speed), Nitro (fastest), or Exacto (highest tool-calling accuracy).
List price by provider
InputOutputProvider list prices; the LLM.API discount applies on top.
| Provider | Input | Output | Cache read /M | Latency | Throughput | Uptime |
|---|---|---|---|---|---|---|
| minimax | in $0.27; out $1.1 per 1M tokens | 205K tokens | tools, streaming, reasoning, JSON, structured | |||
| novita | in $0.3; out $1.2 per 1M tokens | 205K tokens | tools, streaming, reasoning, JSON |
Prices and availability from the LLMAPI catalogue, updated nightly. Last updated 8 Oct 2026.
Try this model
Test MiniMax M2.1 right here — free to start.
Suggestions for your first prompt
Code snippet
Call the model through the OpenAI-compatible API.
Switching from OpenAI? Change 2 lines.
- base_url="https://api.openai.com/v1"
- api_key="YOUR_OPENAI_KEY"
+ base_url="https://api.llmapi.ai/v1"
+ api_key="YOUR_LLMAPI_KEY"Everything else stays the same — SDK, message format, tools, streaming. Set model to minimax-m2.1 and the call runs unchanged.
curl https://api.llmapi.ai/v1/chat/completions \
-H "Authorization: Bearer $LLMAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-m2.1",
"messages": [
{"role": "user", "content": "Give me three crisp launch checklist items."}
]
}'from openai import OpenAI
client = OpenAI(
api_key="YOUR_LLMAPI_KEY",
base_url="https://api.llmapi.ai/v1",
)
resp = client.chat.completions.create(
model="minimax-m2.1",
messages=[
{"role": "system", "content": "You are a precise product assistant."},
{"role": "user", "content": "Give me three crisp launch checklist items."},
],
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.LLMAPI_KEY,
baseURL: "https://api.llmapi.ai/v1",
});
const resp = await client.chat.completions.create({
model: "minimax-m2.1",
messages: [
{ role: "user", content: "Give me three crisp launch checklist items." },
],
});
console.log(resp.choices[0].message.content);stream = client.chat.completions.create(
model="minimax-m2.1",
messages=[{"role": "user", "content": "Write a haiku about latency."}],
stream=True,
)
for chunk in stream:
delta = chunk.choices[0].delta.content
if delta:
print(delta, end="", flush=True){
"model": "minimax-m2.1",
"messages": [
{"role": "system", "content": "You are a precise product assistant."},
{"role": "user", "content": "Give me three crisp launch checklist items."}
]
}ENDPOINTS
Supported endpoints & features
Base URL https://api.llmapi.ai/v1 · model ID minimax-m2.1 · OpenAI-compatible.
POST /v1/chat/completionsChat Completions — supported
| Feature | Status | How to set it |
|---|---|---|
| Function calling (tools) | Supported | tools, tool_choice |
| Parallel tool calls | Not supported | parallel_tool_calls |
| JSON mode | Supported | response_format: {"type": "json_object"} |
| Structured outputs | Supported | response_format: {"type": "json_schema", …} |
| Streaming | Supported | stream: true |
| Vision (image input) | Not supported | image_url content parts |
| Web search | Not supported | web_search |
ERRORS
Errors & fallback routing
| Code | What it means | What to do |
|---|---|---|
401 | Missing or invalid API key. | Send Authorization: Bearer YOUR_LLMAPI_KEY and check the key is active. |
429 | Rate limited, or the upstream provider is throttling the request. | Back off and retry with jitter; the gateway also retries the request on another provider where one is available. |
5xx | Upstream provider error or timeout. | Retry; fallback routing sends the retry to the next healthy provider for this model. |
When a provider fails or throttles, the request is routed to the next provider serving this model — the ones listed in the providers table above.
MiniMax M2.1: Self-Hosting & Deployment Guide in production
What the model is good at.
-
Advanced Chatting
Serves as a high-quality chat model for interactive dialogue, complex instructions, and multi-step conversational workflows across diverse domains.
-
Code Generation
Optimized for robust software engineering tasks including coding, refactoring, debugging, and automated code review across many programming languages.
-
Multimodal Input
Supports both text and image inputs, enabling reasoning over visual content combined with natural language for richer interactions.
-
Multilingual Skills
Handles multilingual development and reasoning tasks, supporting software engineering and general prompts in multiple human languages effectively.
-
Tool-Use Reasoning
Enhanced long-horizon planning and tool use for agentic workflows, executing complex sequences of actions and integrations reliably.
What you get when you call MiniMax M2.1: Self-Hosting & Deployment Guide through LLM.API.
-
Intelligent Model Routing
Automatically route each request to the optimal model across providers based on latency, cost, and quality—without changing your integration or redeploying code.
One endpoint, every model. -
Cost-Aware Orchestration
Control spend with smart tiering, price caps, and dynamic model selection so you always get the best results at the lowest predictable cost.
Optimize quality per dollar. -
Resilient Fallback Logic
Stay online when a provider fails with automatic failover to backup models, configurable retries, and graceful degradation built into the gateway.
No single point of failure. -
End-to-End Observability
Trace every LLM call with logs, metrics, and latency breakdowns across providers to debug faster, tune prompts, and meet production SLAs.
See every token hop. -
Task-Level Abstractions
Call high-level tasks—chat, generate, extract, classify—instead of model-specific APIs, so you can swap providers without rewriting business logic.
Code to tasks, not models. -
High-Throughput Batch Jobs
Run large-scale batch inferences with automatic chunking, concurrency control, and retry policies to process millions of records efficiently across providers.
Batch at production scale.
When to Use — When NOT to Use
Use it if...
- You need a cost-effective general-purpose LLM for chatbots and virtual assistants.
- You need fluent English and Chinese conversational ability for consumer or enterprise apps.
- Your use case involves moderate-length document understanding without extreme long-context requirements.
- You need decent coding assistance for common programming languages without top-tier reasoning demands.
- Your use case involves creative content generation like marketing copy, drafts, or summaries.
- You need an alternative to US-based providers for data residency or vendor diversification.
Avoid if...
- You need frontier-level reasoning performance comparable to the very latest flagship models.
- Your workload requires extremely long-context processing, such as full-codebase or multi-book analysis.
- You need strict, audited compliance for sensitive regulated workloads like medical or financial advice.
- Your workload requires best-in-class code generation, refactoring, and debugging on complex repositories.
- You need rich ecosystem integrations, tools, and plugins comparable to largest global LLM platforms.
- Your workload requires highly specialized domain models, like advanced scientific or legal reasoning.
COMMUNITY
What developers say about MiniMax M2.1
Summarised from public developer discussions and write-ups. Opinions are the sources’, not LLM.API’s.
- Developers on Piefed report the model is a significant breakthrough for niche languages like J, offering succinct thinking and better performance than GPT models relative to their respective benchmark scores.
- Developers on WHN note that while the model is slightly less capable than Claude Sonnet at instruction following, its aggressive pricing makes it highly effective for running multiple parallel copies for tasks.
- Users on Lemmy describe the 230B MoE model as 'reasonably small' for local deployment, noting that quantized versions can fit within 128GB to 256GB of RAM on high-end consumer hardware.
SOURCES
Frequently Asked Questions
-
What is MiniMax M2.1?
MiniMax M2.1 is a large language model by MiniMax focused on fast, cost-efficient text generation for general-purpose application development.
-
What is MiniMax M2.1 best suited for?
MiniMax M2.1 is best for chatbots, agents, code assistants, and other high-throughput applications where low latency and low cost are important.
-
What context window does MiniMax M2.1 support via LLM.API?
MiniMax M2.1 supports a 32K token context window through LLM.API, enabling long conversations and large prompt inputs.
-
How fast is MiniMax M2.1 on LLM.API?
MiniMax M2.1 is optimized for low latency on LLM.API, typically returning first tokens in under a second for standard prompt sizes.
-
What modalities does MiniMax M2.1 support?
MiniMax M2.1 supports text input and text output only; it does not handle images, audio, or video.
-
How is MiniMax M2.1 priced on LLM.API?
MiniMax M2.1 uses token-based pricing on LLM.API, with separate input and output token rates visible in the LLM.API pricing dashboard.
-
How do I call MiniMax M2.1 through the LLM.API?
You select the MiniMax M2.1 model name in your LLM.API request payload, keeping the same unified chat or completion schema as other providers.
-
How does MiniMax M2.1 compare to similar mid-tier models?
MiniMax M2.1 generally trades slightly lower raw reasoning strength for faster responses and lower costs than many similarly sized general-purpose models.
-
Does MiniMax M2.1 support streaming responses on LLM.API?
Yes, MiniMax M2.1 supports token streaming via LLM.API, allowing partial results to be consumed as they are generated.
-
What are the main limitations of MiniMax M2.1?
MiniMax M2.1 can hallucinate facts, struggle with highly specialized domains, and should not be used without human oversight for critical decisions.
-
Can I use MiniMax M2.1 for code generation and debugging?
Yes, MiniMax M2.1 can generate and refactor code, but outputs may contain bugs and should always be reviewed and tested.
-
Does MiniMax M2.1 support tools or function calling via LLM.API?
You can use LLM.API's standard tool or function-calling interface with MiniMax M2.1 to let it invoke external APIs during generation.
COMPARE
Competitive Models
MiniMax M2.7
$0.3 in / $1.2 out per 1M tokens, 204,800 context — the closest current alternative to MiniMax M2.1.
DeepSeek V3.2
$0.25 in / $0.5 out per 1M tokens, 163,840 context — the closest current alternative to MiniMax M2.1.
Codestral
$0.3 in / $0.9 out per 1M tokens, 256,000 context — the closest current alternative to MiniMax M2.1.
MiniMax M2.5 is a frontier-class, agent-native large language model from MiniMax that combines a Mixture-of-Experts architecture with long-context, cost-efficient inference for real-world productivity tasks.
MiniMax M2.5 (free)
Up to 30%MiniMax M2.5 (free) is a third-generation, open-source agentic large language model from MiniMax, offered via multiple providers with free usage tiers. It is notable for its long context window and strong coding and productivity capabilities while remaining cost-efficient.
MiniMax M2.7
MiniMax M2.7 is a 230B-parameter Mixture-of-Experts large language model from MiniMax, with 10B active parameters and a 204,800-token context window, optimized for coding, agentic tool use, and complex multi-step workflows.
Get one key to every model
Swap your API key. Keep your code.