Bonus: Top up now and we'll double your first deposit — get x2 credits instantly.

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 / quantizationWeightsFigureSource
BF16 (full precision)457.4 GBEstimate228.7B params × 2 bytes
AWQ 4-bit124.9 GBFile sizeQuantTrio/MiniMax-M2.1-AWQ
MLX 4-bit128.7 GBFile sizemlx-community/MiniMax-M2.1-4bit
GGUF Q8_0243.1 GBFile sizeunsloth/MiniMax-M2.1-GGUF
GGUF Q4_K_M138.3 GBFile sizeunsloth/MiniMax-M2.1-GGUF
GGUF Q2_K83.3 GBFile sizeunsloth/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

HardwareBF16 (full precision)AWQ 4-bitMLX 4-bitGGUF Q8_0GGUF Q4_K_MGGUF Q2_K
NVIDIA H200141 GB4×2×2×2×2×1×
NVIDIA H10080 GB7×2×2×4×2×2×
NVIDIA A100 80GB80 GB7×2×2×4×2×2×
NVIDIA L40S48 GB—3×4×6×4×2×

GPUs needed per variant.

HardwareGGUF Q8_0GGUF Q4_K_MGGUF 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.

HardwareGGUF Q8_0GGUF Q4_K_MGGUF Q2_KMLX 4-bit
Mac, 512 GBM3 UltraFitsFitsFitsFits
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.

HardwareBF16 (full precision)AWQ 4-bitMLX 4-bitGGUF Q8_0GGUF Q4_K_MGGUF Q2_K
AWS p5.48xlarge8× H100 · 640 GBFitsFitsFitsFitsFitsFits
AWS p4de.24xlarge8× A100 80GB · 640 GBFitsFitsFitsFitsFitsFits
AWS g6e.12xlarge4× L40S · 192 GB—FitsFits—FitsFits
Google Cloud a3-highgpu-8g8× H100 · 640 GBFitsFitsFitsFitsFitsFits
Azure ND H100 v58× H100 · 640 GBFitsFitsFitsFitsFitsFits

Whole-instance GPU memory; public instance specs.

Serve it yourself

pip install -U vllm
vllm serve MiniMaxAI/MiniMax-M2.1
pip install 'sglang[all]'
python -m sglang.launch_server --model-path MiniMaxAI/MiniMax-M2.1
llama-server -hf unsloth/MiniMax-M2.1-GGUF:Q4_K_M \
  --ctx-size 32768 --n-gpu-layers 99
pip 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

InputOutput
minimax$0.27 in
$1.1 out
novita$0.3 in
$1.2 out

Provider list prices; the LLM.API discount applies on top.

Provider Input Output Cache read /M Latency Throughput Uptime
minimaxin $0.27; out $1.1 per 1M tokens205K tokenstools, streaming, reasoning, JSON, structured
novitain $0.3; out $1.2 per 1M tokens205K tokenstools, 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.

MiniMax M2.1
Hi! Want to test the model?

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.

bash
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."}
  ]
}

Supported endpoints & features

Base URL https://api.llmapi.ai/v1 · model ID minimax-m2.1 · OpenAI-compatible.

  • POST /v1/chat/completionsChat Completions — supported
FeatureStatusHow to set it
Function calling (tools)Supportedtools, tool_choice
Parallel tool callsNot supportedparallel_tool_calls
JSON modeSupportedresponse_format: {"type": "json_object"}
Structured outputsSupportedresponse_format: {"type": "json_schema", …}
StreamingSupportedstream: true
Vision (image input)Not supportedimage_url content parts
Web searchNot supportedweb_search

Errors & fallback routing

CodeWhat it meansWhat to do
401Missing or invalid API key.Send Authorization: Bearer YOUR_LLMAPI_KEY and check the key is active.
429Rate 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.
5xxUpstream 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.

LLM API rating for MiniMax M2.1

★ 3.4/ 5.0LLM API rating
50% production adoption · 30% category benchmark · 20% tooling & value
✓ Verified benchmark · LMArena + Artificial Analysis
3.5Production adoptionActive open-weight community usage
2.8Benchmark qualityArtificial Analysis Intelligence Index 20.9 · LMArena text rank #159, Elo 1392
3.9Developer ecosystemContext window, tool and JSON support, price against the category median
Reasoning & chat 3.4Coding 3.4Tool & function calling 3.9Long context 3.6
How is this rating calculated?

Every model gets a separate 1.0–5.0 score for each category it can be used in, so a model can rate high for coding and lower for vision. The score combines three parts:

  1. Production adoption — 50%. How widely the model is actually used in production: provider traffic, LiteLLM and gateway usage, open-weight downloads and its LMArena rank. Proven, widely used models score highest.
  2. Category benchmark — 30%. The public benchmark that matters for that category — the Artificial Analysis Intelligence Index and LMArena Elo for reasoning, LMArena coding Elo for coding, image and document support plus vision Elo for vision, tool and JSON support for function calling, measured speed for voice.
  3. Tooling & value — 20%. Context window, support for tools, structured outputs and streaming, and price compared with the category median.

Scores of 4.0 and above are shown in green, 3.0–3.9 in yellow, below 3.0 in red. When a model has no public data for a part, it gets a neutral value instead of an invented number.

A “Verified benchmark” mark (✓) means an independent lab — LMArena or Artificial Analysis — has actually tested that model, and the source figure is shown. Models without that mark are labelled “Estimated from published specs”: the score comes from the published context window, tool and schema support, price and adoption only, because no independent lab has tested them yet.

One exception: a brand-new top-tier model that scores very high on the independent benchmarks but has no usage history yet is rated on the benchmark (60%) and tooling & value (40%) alone, so a missing adoption figure can't hold it back. All inputs come from public sources and are refreshed weekly.

Adoption and benchmark inputs come from public sources — LMArena, Artificial Analysis Intelligence Index and published model specs. Updated weekly.

What developers say about MiniMax M2.1

LMArena#159 · Elo 1392Arena coding#140 · Elo 1421Speed—Sources: LMArena, Artificial Analysis

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.

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.

Get one key to every model

Swap your API key. Keep your code.