Skip to content

MiniMax M2 API

200K context · Released Mar 17, 2026 · By MiniMax · MIT

MiniMax M2 costs $0.19 per million input tokens and $0.72 per million output tokens, against an official rate of $0.3 and $1.2 — 40% below official pricing. It is a MiniMax model under the MIT licence, with a 200K context window, callable through an OpenAI-compatible endpoint with the model id `minimax/minimax-m2`. This model is listed for reference and is not currently served by an upstream provider, so requests for it return no available channel.

Not currently available. No configured upstream serves this model, so a request for it returns no available channel. The rate below is what it will cost when it is enabled.

Input

$0.19/M

$0.30/M

Output

$0.72/M

$1.20/M

Savings

40%

off official

  • No markup
  • OpenAI SDK compatible
  • No minimum spend
  • MIT

Tuned specifically for agentic coding. Noticeably better than its price class at staying on-task through long tool-call sequences.

Copy this and go

The model id is already filled in. Nothing in this snippet needs editing except your key.

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://router.xark.io/api/v1"   # ← the only line that changes
)

response = client.chat.completions.create(
    model="minimax/minimax-m2",
    messages=[{"role": "user", "content": "Hello"}]
)

MiniMax M2 pricing across providers

Rates as published by each provider. We update these when they change; if you spot one that's stale, tell us and we'll fix it.

ProviderInputOutput
AI Token Router$0.19/M$0.72/M
Official (MiniMax)$0.30/M$1.20/M
OpenRouter$0.29/M$1.16/M
DeepInfra$0.22/M$0.85/M
Together AINot offered

Cached input on MiniMax M2 is billed at $0.038/M — roughly 80% below the standard input rate. For agent loops with a large fixed system prompt this is usually the number that matters most.

Other text models

Start using MiniMax M2 today

$5 in free credits, no credit card required.