---
title: MiniMax: MiniMax M2 API | Text Generation | ModelsLab
description: Compact MoE LLM with 230B total/10B active params, 128K-205K context, 44-1500 tokens/sec on A100; excels in coding, agentic tasks, tool use.[1][2][3][5]
url: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/minimax/minimax-minimax-m2/api.md
canonical: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/minimax/minimax-minimax-m2/api.md
type: product
component: Playground/LLM/Index
generated_at: 2026-05-13T10:35:55.755047Z
---

MiniMax: MiniMax M2
---

 [LLMs.txt](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/minimax-minimax-m2/llms.txt) [.md](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/minimax/minimax-minimax-m2.md)

minimax-minimax-m2 minimax Closed Source Model $0.627500 / call

MiniMax: MiniMax M2
---

Choose a prompt below to get started or type your own message

 Explain quantum computing in simple terms

 Write a Python function to sort a list

 Create a marketing email for a SaaS product

 Compare REST vs GraphQL APIs

Send

### MiniMax: MiniMax M2

minimax minimax-minimax-m2

Copy model ID

PricingInput $0.255 / 1M tokens

Output $1.00 / 1M tokens

API EndpointsOpenAI Compatible

`https://modelslab.com/api/v7/llm/chat/completions`Endpoint

Anthropic Compatible

`https://modelslab.com/api/v7/llm/v1/messages`Messages

`https://modelslab.com/api/v7/llm/v1/messages/count_tokens`Count Tokens

`https://modelslab.com/api/v7/llm/v1/models`Models

Use with Claude Code

cURL Example

ParametersSystem MessageYou are a helpful AI assistant specialized in providing accurate and detailed responses.

Temperature0.7

Max Tokens1000

Top P0.9

Frequency Penalty0

Presence Penalty0

Model Info

Support

Related Models
---

Discover similar models you might be interested in

 [View all LLM Models](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster)

[OG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-5.2-chat)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: GPT-5.2 Chat

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-5.2-chat)

[N3](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/nim-meta-llama-3.1-8b-instruct)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [nim/meta/llama-3.1-8b-instruct

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/nim-meta-llama-3.1-8b-instruct)

[N8](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/nim-mistralai-mixtral-8x7b-instruct-v01)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [nim/mistralai/mixtral-8x7b-instruct-v01

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/nim-mistralai-mixtral-8x7b-instruct-v01)

[QN](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen3-Next-80B-A3B-Thinking)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Qwen3 Next 80B A3b Thinking

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen3-Next-80B-A3B-Thinking)

[Q1](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen3.5-122B-A10B-FP8)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Qwen3.5 122B A10b Fp8

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen3.5-122B-A10B-FP8)

[MM](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-mistral-7b-instruct-v0.1)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Mistral: Mistral 7B Instruct v0.1

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-mistral-7b-instruct-v0.1)

[GL](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/google-lyria-3-pro-preview)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Google: Lyria 3 Pro Preview

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/google-lyria-3-pro-preview)

[CC](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/cohere-command-r-plus-08-2024)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Cohere: Command R+ (08-2024)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/cohere-command-r-plus-08-2024)

[ZG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/z-ai-glm-4.5-air-free)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Z.ai: GLM 4.5 Air (free)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/z-ai-glm-4.5-air-free)

[QQ](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-max)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Qwen: Qwen3 Max

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-max)

[OG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-5-codex)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: GPT-5 Codex

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-5-codex)

[CV](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/deepcogito-cogito-v1-preview-qwen-14B)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Cogito V1 Preview Qwen 14B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/deepcogito-cogito-v1-preview-qwen-14B)

[NA](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/nex-agi-deepseek-v3.1-nex-n1)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Nex AGI: DeepSeek V3.1 Nex N1

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/nex-agi-deepseek-v3.1-nex-n1)

[SR](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/switchpoint-router)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Switchpoint Router

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/switchpoint-router)

[G4](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/google-gemma-4-31B-it)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Gemma 4 31B-it FP8

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/google-gemma-4-31B-it)

[GN](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/google-gemini-3-pro-image-preview)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Google: Nano Banana Pro (Gemini 3 Pro Image Preview)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/google-gemini-3-pro-image-preview)

[OO](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-o1)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: o1

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-o1)

[QQ](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-vl-235b-a22b-thinking)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Qwen: Qwen3 VL 235B A22B Thinking

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-vl-235b-a22b-thinking)

About MiniMax: MiniMax M2
---

MiniMax-M2 is a compact, high-efficiency large language model optimized for end-to-end coding and agentic workflows. With 10 billion activated parameters (230 billion total), it delivers near-frontier intelligence across general reasoning,...

### Technical Specifications

Model IDminimax-minimax-m2CategoryLLM ModelsTaskText GenerationPrice$0.627500 per million tokensAddedFebruary 20, 2026

### Key Features

- Chat completion and multi-turn conversation API
- Streaming response with token-by-token output
- Function calling and tool use support
- System prompts and role-based messaging
- JSON mode and structured output

### Quick Start

Integrate MiniMax: MiniMax M2 into your application with a single API call. Get your API key from the [pricing page](https://modelslab-frontend-v2-927501783998.us-east4.run.app/pricing) to get started.

PythonJavaScriptcURLPHP

```
<code>import requests
import json

url = "https://modelslab.com/api/v7/llm/chat/completions"

headers = {
    "Content-Type": "application/json"
}

data = {
        "model_id": "minimax-minimax-m2",
        "messages": [
            {
                "role": "user",
                "content": "Hello!"
            }
        ],
        "max_tokens": 1000,
        "key": "YOUR_API_KEY"
    }

try:
    response = requests.post(url, headers=headers, json=data)
    response.raise_for_status()  # Raises an HTTPError for bad responses (4XX or 5XX)
    result = response.json()
    print("API Response:")
    print(json.dumps(result, indent=2))
except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err} - {response.text}")
except Exception as err:
    print(f"Other error occurred: {err}")</code>
```

View the [full API documentation](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/minimax/minimax-minimax-m2/api) for SDKs, code examples in Python, JavaScript, and more.

### Pricing

MiniMax: MiniMax M2 API costs $0.627500 per million tokens. Pay only for what you use with no minimum commitments. [View pricing plans](https://modelslab-frontend-v2-927501783998.us-east4.run.app/pricing)

### Use Cases

- AI chatbots and virtual assistants
- Code generation and developer tools
- Content writing and copywriting automation
- Data analysis, summarization, and extraction

[Browse LLM Models](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster) [More from Minimax](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router) [View Pricing](https://modelslab-frontend-v2-927501783998.us-east4.run.app/pricing)

MiniMax: MiniMax M2 FAQ
---

### What is MiniMax: MiniMax M2?

MiniMax-M2 is a compact, high-efficiency large language model optimized for end-to-end coding and agentic workflows. With 10 billion activated parameters (230 billion total), it delivers near-frontier intelligence across general reasoning,...

### How do I use the MiniMax: MiniMax M2 API?

You can integrate MiniMax: MiniMax M2 into your application with a single API call. Sign up on ModelsLab to get your API key, then use the model ID "minimax-minimax-m2" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does MiniMax: MiniMax M2 cost?

MiniMax: MiniMax M2 costs $0.627500 per million tokens. ModelsLab uses pay-per-use pricing with no minimum commitments. A free tier is available to get started.

### What is the MiniMax: MiniMax M2 model ID?

The model ID for MiniMax: MiniMax M2 is "minimax-minimax-m2". Use this ID in your API requests to specify this model.

### Does MiniMax: MiniMax M2 have a free tier?

Yes, ModelsLab offers a free tier that lets you try MiniMax: MiniMax M2 and other AI models. Sign up to get free API credits and start building immediately.

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-05-13*