Complex software engineering, debugging, and multi-step agentic tool calling
- Tool calling
SupportedTool calling · Supported
- Reasoning
SupportedReasoning · Supported
- Vision
SupportedVision · Supported
- Streaming
SupportedStreaming · Supported
- JSON mode
UnsupportedJSON mode · Unsupported
USD / 1M tokens
- Input
- $0.80
- Cache read
- $0.05
- Cache write
- —
- Output
- $3.10
- Context
- 1M
- Max output
- 256K
- Precision
- Official precision
- Price checked
Model availability and prices
Overview
MiniMax M4 is a natively multimodal flagship language model (2.74T total / 66B active parameters) designed for complex coding, agentic workflows, long-context analysis, and visual understanding. It supports a 1,000,000-token context window, up to 262,144 output tokens (including thinking and final answer tokens), automatic prompt caching with no cache-write fee, and configurable adaptive reasoning effort from low to max.
- Version
- MiniMax-M4
- Input / output
- text, image / text
- Endpoint
- /v1/chat/completions, /v1/responses, /v1/messages
API protocols and integration
- Base URL · OpenAI SDK
https://api.iteracompute.com/v1- Authentication
Authorization: Bearer ITERACOMPUTE_API_KEY
Choose request fields, response parsing and stream completion by endpoint. This table describes wire formats; see this model's capabilities and verification scope.
| Customer endpoint | Model status | Input / output budget | Result | SSE completion |
|---|---|---|---|---|
OpenAI Chat CompletionsPOST /v1/chat/completions | Declared for this model | messagesmax_tokens | choices[0].message.content | [DONE] |
OpenAI ResponsesPOST /v1/responses | Declared for this model | inputmax_output_tokens | output[] (SDK: output_text) | response.completed |
Anthropic MessagesPOST /v1/messages | Declared for this model | messages; system (top-level)max_tokens (required) | content[] | message_stop |
For the Messages SDK use https://api.iteracompute.com as base URL; max_tokens is required. Do not reuse another protocol's fields.
LLMs.txt · Copy for an AI coding assistant
Includes this model's ID, wire formats and parameter constraints. Check this page's verification scope and current prices before use.
# IteraCompute · minimax/minimax-m4
Model ID: minimax/minimax-m4
Base URL (OpenAI SDK): https://api.iteracompute.com/v1
Authentication: Authorization: Bearer ITERACOMPUTE_API_KEY
Content-Type: application/json
Use only the customer endpoints below. Request and response formats differ by protocol. An endpoint declaration does not certify every capability.
## Chat Completions
POST https://api.iteracompute.com/v1/chat/completions
Input: messages
Output budget: max_tokens
Read result: choices[0].message.content
SSE completion: [DONE]
Docs: https://iteracompute.com/docs.html#api-reference
## Responses
POST https://api.iteracompute.com/v1/responses
Input: input
Output budget: max_output_tokens
Read result: output[] (SDK: output_text)
SSE completion: response.completed
Docs: https://iteracompute.com/docs.html#responses-api
## Messages
POST https://api.iteracompute.com/v1/messages
Input: messages; system (top-level)
Output budget: max_tokens (required)
Read result: content[]
SSE completion: message_stop
Docs: https://iteracompute.com/docs.html#anthropic-messages
## Parameters
Configuration and parameter acceptance do not establish semantic capability. Do not invent undisclosed defaults.
Parameter revision: 7e74bcadddab798460e5915f46d5b23a1bfebc3cab9e6b278b08e1ea99fbdf30
Context tokens: 1000000
Maximum output tokens: 262144
Capability tools: configured enabled (see verification scope)
Capability vision: configured enabled (see verification scope)
Capability json_mode: disabled
Capability reasoning: configured enabled (see verification scope)
Capability streaming: configured enabled (see verification scope)
- n: integer; accepted; min=1; max=1; default=Undisclosed. Number of completions; many routes accept only 1.
- tools: array; accepted; min=unknown; max=unknown; default=Undisclosed. Tool definitions; the application executes tool calls and returns results.
- top_p: number; accepted, ignored upstream; min=0 (exclusive); max=1; default=not applicable. Nucleus sampling probability threshold.
- stream: boolean; accepted; min=unknown; max=unknown; default=Undisclosed. Enable SSE streaming; completion markers depend on the protocol.
- max_tokens: integer; accepted; min=1; max=262144; default=Undisclosed. Output token budget; includes reasoning where applicable. Chat Completions / Messages.
- temperature: number; accepted, ignored upstream; min=0; max=2; default=not applicable. Sampling randomness. An accepted but ignored value does not control generation.
- tool_choice: any; accepted; min=unknown; max=unknown; default=Undisclosed. Choose whether and which tool to call; allowed shapes vary by protocol.
- cache_control: object; unsupported; min=unknown; max=unknown; default=not applicable. Cache policy on a message, content block, system block or tool definition.
- response_format: object; unsupported; min=unknown; max=unknown; default=not applicable. Text: Chat output format. Images: b64_json only; not text JSON mode.
- presence_penalty: number; unsupported; min=unknown; max=unknown; default=not applicable. Penalize tokens already present in the generated text.
- frequency_penalty: number; unsupported; min=unknown; max=unknown; default=not applicable. Penalize repeated tokens according to frequency.
- max_output_tokens: integer; accepted; min=1; max=262144; default=Undisclosed. Responses output budget. Chat acceptance must be checked separately.
- max_completion_tokens: integer; accepted; min=1; max=262144; default=Undisclosed. Alternative Chat output budget; use only when accepted by this model.
- reasoning_effort: enum; accepted; values=["low","medium","high","xhigh","max"]; default=max. Chat reasoning effort; use the model's listed values, not another protocol's shape.
## Chat Completions example · JSON body
```json
{
"model": "minimax/minimax-m4",
"messages": [
{
"role": "user",
"content": "Reply OK"
}
],
"max_tokens": 256,
"reasoning_effort": "low"
}
```
## Responses example · JSON body
```json
{
"model": "minimax/minimax-m4",
"input": "Reply OK",
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}
```
## Messages example · JSON body
```json
{
"model": "minimax/minimax-m4",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Reply OK"
}
],
"output_config": {
"effort": "low"
}
}
```
## References
Model catalog: https://iteracompute.com/models/
Current prices and billing: https://iteracompute.com/pricing/
Documentation index: https://iteracompute.com/llms.txt
Unknown prices are not zero. Account and subscription limits also apply.
Never include a real API key in an LLM prompt or client-side code.
API parameters
- Context window: 1,000,000 tokens; maximum output budget: 262,144 tokens (recommended 131,072), shared across reasoning and final answer tokens.
- Retail pricing (USD per 1M tokens): Input $0.80, Cache Read $0.05, Output $3.10. Prompt caching uses automatic prefix matching with no separate cache-write fee.
- Supports /v1/chat/completions (max_tokens / max_completion_tokens), /v1/responses (max_output_tokens), and /v1/messages (max_tokens) with streaming and tool calling.
- Adaptive reasoning supports effort levels low, medium, high, xhigh, and max (default: max); disabling reasoning is rejected before dispatch.
These parameters and ranges describe the current route. Account and context limits also apply. Parameter acceptance does not establish model capability.
- Tool calling
- Supported
- Reasoning
- Supported
- Vision
- Supported
- Streaming
- Supported
- JSON mode
- Unsupported
Parameters and values
Click a parameter to copy its name; scroll the table horizontally to see all columns. Usage notes identify protocol differences; identical names do not guarantee cross-endpoint support.
| Parameter | Type | Acceptance | Range | Usage / protocol |
|---|---|---|---|---|
| integer | Accepted | [1, 1] | Number of completions; many routes accept only 1. | |
| array | Accepted | — | Tool definitions; the application executes tool calls and returns results. | |
| number | Ignored upstream | (0, 1] | Nucleus sampling probability threshold. | |
| boolean | Accepted | — | Enable SSE streaming; completion markers depend on the protocol. | |
| integer | Accepted | [1, 262144] | Output token budget; includes reasoning where applicable. Chat Completions / Messages. | |
| number | Ignored upstream | [0, 2] | Sampling randomness. An accepted but ignored value does not control generation. | |
| any | Accepted | — | Choose whether and which tool to call; allowed shapes vary by protocol. | |
| object | Unsupported | — | Cache policy on a message, content block, system block or tool definition. | |
| object | Unsupported | — | Text: Chat output format. Images: b64_json only; not text JSON mode. | |
| number | Unsupported | — | Penalize tokens already present in the generated text. | |
| number | Unsupported | — | Penalize repeated tokens according to frequency. | |
| integer | Accepted | [1, 262144] | Responses output budget. Chat acceptance must be checked separately. | |
| integer | Accepted | [1, 262144] | Alternative Chat output budget; use only when accepted by this model. | |
| enum | Accepted | ["low","medium","high","xhigh","max"] | Chat reasoning effort; use the model's listed values, not another protocol's shape. |
Current configuration example
POST /v1/chat/completions
{
"model": "minimax/minimax-m4",
"messages": [
{
"role": "user",
"content": "Reply OK"
}
],
"max_tokens": 256,
"reasoning_effort": "low"
}Parameter revision:7e74bcadddab
API
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.iteracompute.com/v1",
api_key=os.environ["ITERACOMPUTE_API_KEY"],
)
response = client.chat.completions.create(
model="minimax/minimax-m4",
messages=[
{
"role": "user",
"content": "Reply OK"
}
],
max_tokens=256,
reasoning_effort="low",
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.iteracompute.com/v1",
apiKey: process.env.ITERACOMPUTE_API_KEY,
});
const response = await client.chat.completions.create({
"model": "minimax/minimax-m4",
"messages": [
{
"role": "user",
"content": "Reply OK"
}
],
"max_tokens": 256,
"reasoning_effort": "low"
});
console.log(response.choices[0].message.content);curl https://api.iteracompute.com/v1/chat/completions \
-H "Authorization: Bearer ITERACOMPUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax/minimax-m4",
"messages": [
{
"role": "user",
"content": "Reply OK"
}
],
"max_tokens": 256,
"reasoning_effort": "low"
}'import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.iteracompute.com/v1",
api_key=os.environ["ITERACOMPUTE_API_KEY"],
)
response = client.responses.create(
model="minimax/minimax-m4",
input="Reply OK",
max_output_tokens=256,
reasoning={
"effort": "low"
},
)
print(response.output_text)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.iteracompute.com/v1",
apiKey: process.env.ITERACOMPUTE_API_KEY,
});
const response = await client.responses.create({
"model": "minimax/minimax-m4",
"input": "Reply OK",
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
});
console.log(response.output_text);curl https://api.iteracompute.com/v1/responses \
-H "Authorization: Bearer ITERACOMPUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax/minimax-m4",
"input": "Reply OK",
"max_output_tokens": 256,
"reasoning": {
"effort": "low"
}
}'import os
from anthropic import Anthropic
client = Anthropic(
base_url="https://api.iteracompute.com",
api_key=os.environ["ITERACOMPUTE_API_KEY"],
)
response = client.messages.create(
model="minimax/minimax-m4",
max_tokens=256,
messages=[
{
"role": "user",
"content": "Reply OK"
}
],
output_config={
"effort": "low"
},
)
print("".join(block.text for block in response.content if block.type == "text"))import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "https://api.iteracompute.com",
apiKey: process.env.ITERACOMPUTE_API_KEY,
});
const response = await client.messages.create({
"model": "minimax/minimax-m4",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Reply OK"
}
],
"output_config": {
"effort": "low"
}
});
console.log(response.content.filter(block => block.type === "text").map(block => block.text).join(""));curl https://api.iteracompute.com/v1/messages \
-H "x-api-key: ITERACOMPUTE_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax/minimax-m4",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Reply OK"
}
],
"output_config": {
"effort": "low"
}
}'Pricing
USD per million tokens. — means unknown. Account and subscription limits still apply.
- Version / Model ID
minimax/minimax-m4MiniMax-M4- Context
- 1M
- Precision
- Official precision
- Price checked
- Verification scope and sources
View verification scope and sources
2026-12-04 · Live short-request verification on the isolated production-image gateway covered all three text APIs (ordinary and streaming with terminal events and usage), tool calling, mandatory adaptive reasoning, red/blue image recognition, json_mode pre-dispatch rejection, authorization, billing tariff math, and all 14 public parameter boundaries. Full-context quality and sustained load were not tested.
Complete token prices
USD per million tokens. Unknown prices are shown as —. Token ranges include cache reads and writes; ranges use (start, end].
| Billing item | Our price | Official reference |
|---|---|---|
| Input | $0.8 | $0.8 |
| Cache read | $0.05 | $0.05 |
| Output | $3.1 | $3.1 |
5bc8247e7d62Vendor-documented context window · 1,000,000 tokens · Maximum output · 262,144 tokens ·
Cost calculator
USD · EstimateAdvanced token usage
Input includes cache reads and writes; these portions must not overlap. Output already includes reasoning; enter reasoning as a subset, never add it twice. Count agent steps and retries as requests.
Estimated monthly cost
—USDMiniMax M4
Cache hits and capacity are not guaranteed.
Cost breakdown
- Uncached input
- —
- Cache read
- —
- Cache writes (5m + 1h)
- —
- Output (including reasoning)
- —
Usage limits
- Adaptive reasoning is always enabled and cannot be turned off; passing reasoning_effort='none' or disabling thinking is rejected.
- Chat Completions response_format (json_mode) is disabled on this route because the upstream API ignores it.
- Upstream fixes sampling at temperature=1 and top_p=0.95 (accepted within valid ranges but ignored); presence_penalty, frequency_penalty, and explicit cache_control are disabled, and n is limited to 1.
- Full 1,000,000-token context quality, video input, and sustained high-concurrency latency are outside the current short-request verification scope.
Use cases
Long-context document and repository reasoning up to 1,000,000 input tokens
Multimodal text and image understanding across Chat Completions, Responses, and Messages APIs
Deep analytical reasoning with selectable effort tiers (low, medium, high, xhigh, max)
Integration tools and guides
FAQ
How do I call MiniMax M4?
Use Model ID minimax/minimax-m4 and the native fields in this page's API examples. Declared endpoints: /v1/chat/completions, /v1/responses, /v1/messages.
How is usage priced?
Use the current prices and billing units. Missing prices remain unknown, not free. The calculator uses native Gateway quotes; an estimate is not a bill.
Which parameters and limits apply?
Check the current parameter table and usage limits. Budget fields differ by protocol. Configured limits do not establish full-window quality or guarantee a maximum-length output.
New arrivals
Explore the models selected for New Arrivals, with API pricing, supported capabilities and integration guides.
MiniMax H3 Lite
New
minimax/MiniMax-H3-Lite
MiniMax H3 Lite is the cost-optimized 480P and 768P multimodal video generation model (4–15 s) with synchronized audio.
Launched on IteraCompute
- 480P · per output second
- $0.025
USD unit prices · rounded up to 3 decimal places for display
MiniMax H3 Highspeed
New
minimax/MiniMax-H3-Highspeed
MiniMax H3 Highspeed delivers accelerated asynchronous 480P and 768P multimodal video generation (4–15 s) with synchronized audio.
Launched on IteraCompute
- 480P · per output second
- $0.04
USD unit prices · rounded up to 3 decimal places for display
MiniMax H3 Image Highspeed
New
minimax/MiniMax-H3-Image-Highspeed
MiniMax H3 Image Highspeed is the accelerated H3 image generation and editing tier for low-latency 1K–4K visual workflows.
Launched on IteraCompute
- Text input
- $2.30
- Image output
- $7.60
USD per million tokens