MiniMax-M2.1 API

MiniMax-M2.1 is an updated Minimax model with a 200K context window optimized for conversational and reasoning tasks.

Modalities
TextText
In / Out price
$0.3/$1.2per 1M
Context window
204K tokens
Released
Dec 23, 2025

MiniMax-M2.1 overview

MiniMax-M2.1 by MiniMax

Engineered for speed and precision, it delivers top-tier multilingual code generation with clean, actionable outputs.

MiniMax-M2.1 specs

Model ID
minimax/m2-1
Developer
MiniMax
Context window
204,000 tokens
Max output
204,000 tokens
Input
Text
Output
Text
API
OpenAI-compatible, base URL https://api.aimlapi.com/v1

Multilingual Code Generation & Refactoring AI Model

MiniMax-M2.1 is a cutting-edge large language model built for high-performance code generation, refactoring, and cross-language reasoning. Optimized for real-world developer workflows, it supports languages such as Rust, Java, Go, C++, TypeScript, and JavaScript, offering fast, clean, and reliable outputs.

Technical Specifications

  • Model type: Multilingual Transformer-based LLM
  • Architecture: Hybrid dense-attention model with optimized code tokenization
  • Context window: 204,800 tokens (input + output)
  • Supported languages: Rust, Go, Java, C++, TypeScript, JavaScript, Python, SQL

Performance Benchmarks

Evaluated using rigorous internal frameworks (e.g., OctoCodingbench, SWE Review), with results averaged over 4 runs.

Key Features

  • Multilingual Coding Mastery: Excels across 6+ major programming languages with syntax-aware generation and refactoring
  • Agentic Reasoning: Maintains coherent reasoning between turns, critical for tool use, IDE integration, and long-horizon tasks
  • Concise & Clean Outputs: Minimizes verbosity while preserving functional correctness and style consistency
  • Real-Time Developer Workflows: Optimized for low latency and high throughput in coding assistants and CI/CD pipelines
  • Open & Deployable: Fully open-source weights enable on-prem, edge, or custom deployment scenarios

Core Use Cases

  • Cross-Language Code Migration: Seamlessly rewrite applications between Rust, Go, and JavaScript without losing logic integrity.
  • Code Review & Refactoring: Automate code readability enhancements, style consistency, and optimization opportunities.
  • Automated Documentation: Generate aligned docstrings, inline comments, and technical documentation for complex repositories.
  • Intelligent Debugging: Detect potential bugs and suggest fixes within a single inference cycle.
  • Developer Tool Integration: Connect via SDKs or APIs to augment IDEs such as VSCode, JetBrains, or Neovim with real-time AI assistance.

Model Comparison

vs. Claude Sonnet 4.5: M2.1 matches or exceeds Sonnet 4.5 in coding-specific benchmarks while using far fewer activated parameters. Offers significantly lower inference cost and latency, making it ideal for high-throughput coding agents.

vs. DeepSeek-Coder: M2.1 demonstrates stronger instruction following in complex, multi-step coding scenarios (e.g., full-stack feature implementation). Excels in real-world tool integration and stateful reasoning, critical for IDE plugins and autonomous agents.

Use cases

  • Cross-Language Code Migration: Seamlessly rewrite applications between Rust, Go, and JavaScript without losing logic integrity.
  • Code Review & Refactoring: Automate code readability enhancements, style consistency, and optimization opportunities.
  • Automated Documentation: Generate aligned docstrings, inline comments, and technical documentation for complex repositories.
  • Intelligent Debugging: Detect potential bugs and suggest fixes within a single inference cycle.
  • Developer Tool Integration: Connect via SDKs or APIs to augment IDEs such as VSCode, JetBrains, or Neovim with real-time AI assistance.

Capabilities

  • Function calling
  • Streaming
  • Structured outputs
  • Reasoning

MiniMax-M2.1 benchmarks by Artificial Analysis

See how MiniMax-M2.1 compares in generation speed and latency. Data retrieved Nov 3, 2026.

Speed

Output tokens / second

Benchmark results

Compare 12 models available on AI/ML API across 5 independent benchmarks.

Humanity's Last Exam

Expert-written questions across academic subjects.

MiniMax-M2.1 API pricing

MiniMax-M2.1 pricing in US dollars
UsagePriceUnit
Input$0.31M tokens
Output$1.21M tokens
Cached input$0.31M tokens

Prices from the AI/ML API price list, checked on Nov 4, 2026.

MiniMax-M2.1 vs other models: token prices

AI/ML API input and output rates for 5 models, per million tokens.

AI/ML API model prices in USD per million tokens
ModelInputOutput
MiniMax-M2.1$0.3$1.2
MiniMax M3.1 Flash$0.15$0.6
MiniMax M3$0.3$1.2
MiniMax M2.1 Highspeed$0.6$2.4
MiniMax M2.7 Highspeed$0.6$2.4

How to use the MiniMax-M2.1 API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "minimax/m2-1",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Related articles

All posts

MiniMax-M2.1 FAQ

What is the context window of MiniMax-M2.1?

MiniMax-M2.1 has a 204,000 tokens context window and can return up to 204,000 tokens.

What inputs and outputs does MiniMax-M2.1 support?

MiniMax-M2.1 takes image, text as input and returns text.

What is the model ID for MiniMax-M2.1?

Use minimax/m2-1 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.

How much does MiniMax-M2.1 cost?

MiniMax-M2.1 costs $0.3 input and $1.2 output per 1M tokens on AI/ML API, billed as you go with no subscription.

Does MiniMax-M2.1 support streaming?

Yes, MiniMax-M2.1 can stream responses as they are generated.

Can MiniMax-M2.1 read images?

Yes, MiniMax-M2.1 accepts image input alongside text.

Who created MiniMax-M2.1?

MiniMax-M2.1 was built by MiniMax.

Start building with MiniMax-M2.1

MiniMax-M2.1 API

minimax/m2-1

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "minimax/m2-1",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'