MiniMax API
MiniMax text API access via RunAPI — sparse MoE models from 200K to 1M context, up to 80.5% SWE-bench Verified.
# Base URL
https://runapi.ai
# Endpoints
POST /v1/chat/completions
POST /v1/responses
POST /v1/messages
POST /v1beta/models/{model}:generateContent
POST /v1beta/models/{model}:streamGenerateContent
curl https://runapi.ai/v1/chat/completions \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-M3",
"messages": [
{
"role": "user",
"content": "Given this API spec, generate a typed client, write integration tests against a mock server, and iterate until they pass."
}
]
}'
from openai import OpenAI
client = OpenAI(
base_url="https://runapi.ai/v1",
api_key="your-runapi-key"
)
response = client.chat.completions.create(
model="MiniMax-M3",
messages=[{"role": "user", "content": "Given this API spec, generate a typed client, write integration tests against a mock server, and iterate until they pass."}]
)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://runapi.ai/v1",
apiKey: "your-runapi-key"
});
const response = await client.chat.completions.create({
model: "MiniMax-M3",
messages: [{ role: "user", content: "Given this API spec, generate a typed client, write integration tests against a mock server, and iterate until they pass." }]
});
MiniMax's M-series are sparse Mixture-of-Experts text models built for cost-efficient coding. M2 through M2.7 (230B total / ~10B active, 256 experts) offer 200K context with progressively stronger agentic capabilities — M2.7 reaches 56.2% on SWE-bench Pro. MiniMax-M3 uses a larger, different architecture to restore 1M context with a new Sparse Attention design, scoring 80.5% on SWE-bench Verified and 59.0% on SWE-bench Pro. Highspeed variants run the same weights at ~100 tokens/sec for latency-sensitive work. All are available through RunAPI with one key and per-token billing.
- Multiple variants for different speed, quality, and cost tiers
- Model skill includes docs, schemas, pricing, and setup notes
- Works with Claude Code, Codex, Gemini CLI, Cursor, and VS Code
- Single API key and unified billing across all variants
- Async task management with polling and webhook callbacks
- Failed generations are not charged
Compare all API variants
| Variant | Billing | Pricing | |
|---|---|---|---|
| MiniMax-M2 | 1K tokens | Input $0.19 / 1M tokens | Output $0.73 / 1M tokens | View → |
| MiniMax-M2.1 | 1K tokens | Input $0.19 / 1M tokens | Output $0.73 / 1M tokens | View → |
| MiniMax-M2.5 | 1K tokens | Input $0.19 / 1M tokens | Output $0.73 / 1M tokens | View → |
| MiniMax-M2.5-highspeed | 1K tokens | Input $0.37 / 1M tokens | Output $1.46 / 1M tokens | View → |
| MiniMax-M2.7 | 1K tokens | Input $0.19 / 1M tokens | Output $0.73 / 1M tokens | View → |
| MiniMax-M2.7-highspeed | 1K tokens | Input $0.37 / 1M tokens | Output $1.46 / 1M tokens | View → |
| MiniMax-M3 | 1K tokens | Input $0.18-$0.36 / 1M tokens | Output $0.72-$1.44 / 1M tokens | View → |
MiniMax API endpoints
Use the OpenAI or Anthropic SDK with your RunAPI key. No extra SDK required.
| Endpoint | Protocol |
|---|---|
| /v1/chat/completions | OpenAI compatible |
| /v1/responses | OpenAI Responses |
| /v1/messages | Anthropic compatible |
| /v1beta/models/{model}:generateContent | Gemini generateContent |
| /v1beta/models/{model}:streamGenerateContent | Gemini streamGenerateContent |
From model skill to first result in four steps
Choose a model
Browse the model catalog and pick the model and variant that match your output type, quality bar, and latency target. Each variant page shows its model ID, pricing, and parameter constraints so you can compare before committing.
Configure
Set your RunAPI API key as an environment variable and install the model skill in your coding workspace. The skill loads docs, typed schemas, pricing notes, and setup steps so your agent has the right context from the start.
Call
Use the skill instructions to add the model feature inside your application. Send a POST request with your prompt, model ID, and parameters. RunAPI routes the request, manages the async lifecycle, and returns structured JSON.
Receive
Poll by task ID for completion, stream results end-to-end when supported, or configure a webhook callback URL to receive results automatically. The CLI provides a built-in wait command, and the SDKs offer both polling and callback patterns.
What is the MiniMax API?
MiniMax M-series text models are sparse MoE LLMs with 200K–1M context, delivering frontier coding scores at a fraction of the cost of dense models. Through RunAPI they share a single API key with pay-as-you-go token billing, callable from the OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages surfaces. These are MiniMax's text models, distinct from MiniMax Hailuo video generation.
Why route the MiniMax API through RunAPI
One auth, every provider
A single RunAPI API key unlocks the whole model catalog across all providers. No separate accounts to create, no API keys to rotate per integration, and no credential management overhead. Add a new model to your app by changing one parameter.
Unified pricing & billing
Per-call pricing in USD, billed monthly into a single invoice. No subscription tiers, no minimum spend, and failed generations are never charged. The pricing page and check_pricing API show exact costs before you commit to a model.
Schema-first SDK
Typed schemas, parameter constraints, and setup notes are packaged in the model skill so your implementation starts from the right contract. The skill loads into Claude Code, Codex, Gemini CLI, Cursor, and VS Code — your agent knows the correct request shape before you write a line of code.
Common questions
Are these the same as MiniMax Hailuo video models?
No. These are MiniMax's text language models for coding and chat; Hailuo is MiniMax's separate video generation line.
Which MiniMax text model should I pick?
MiniMax-M3 is the strongest — 1M context, 80.5% SWE-bench Verified, and the first open-weight model to combine frontier coding with million-token context. M2.7 is the best 200K-context option. Highspeed variants (M2.5 and M2.7) run the same weights at ~100 tokens/sec for lower latency at higher token cost.
Which SDKs can call MiniMax text through RunAPI?
Use the OpenAI SDK (Chat Completions or Responses) or the Anthropic Messages SDK against RunAPI with the MiniMax model id; the proxy adapts the protocol.
How is MiniMax text billed?
Per token at RunAPI's published input and output rates for each model, pay-as-you-go. Highspeed variants cost roughly 2× standard for the same output quality at higher throughput.
Which variant should I start with?
Pick the cheapest variant that meets your quality bar. Most teams start on the fast variant and graduate to pro for production.
Is there a free tier?
New accounts get free first calls on every model. After that, pay per call.
Do you stream results?
Where streaming is available, RunAPI streams end-to-end.
How are failures billed?
Failed generations are not charged.
Are outputs cached?
Generated outputs are stored and retrievable by task ID. Inputs are not cached.
Can I use commercially?
Yes — commercial use is included for every variant unless a model license explicitly restricts it, which is called out on the variant page.
What about rate limits?
Per-key rate limits scale with usage tier. See pricing page for current limits.
Where can I report issues?
Open an issue on the public GitHub repo or email support.