MiniMax M4 API

Multimodal flagship for long-horizon coding and agents with 1M context, adjustable reasoning depth, image and video input, and built-in web search.

MiniMax Text Generation 1M context Released Dec 3, 2026 Singapore Proprietary Endpoint New

About MiniMax M4

Multimodal flagship for long-horizon coding and agents with 1M context, adjustable reasoning depth, image and video input, and built-in web search.

Supports text, image, and video input, five reasoning effort levels with reasoning always on, function calling (tool choice auto or none), implicit prompt cache reads, and built-in web search billed per executed search. Reasoning tokens are billed as output tokens.

reasoning vision video web search function calling cache long context agentic coding

MiniMax M4 specs

Model ID
minimax-m4
Author
MiniMax
Category
Text Generation
Released
Dec 3, 2026
Context window
1M tokens
Max output
262,144 tokens
Input
TextImageVideo
Output
Text
Structured output
Not supported
Region
Singapore
Endpoints
POST/v1/chat/completionsPOST/v1/responsesPOST/v1/messagesPOST/v1beta/models/minimax-m4:generateContent
Alternate model IDs
minimax/m4minimax/minimax-m4

MiniMax M4 API pricingSave up to 25%

Live pay-as-you-go rates from the EmpirioLabs catalog. You can also choose a plan with weekly allowances.

Type
Spec
Rate
Input
per 1M prompt tokens
$0.80$0.60
Output
per 1M generated tokens
$3.10$2.325
Implicit cache read
per 1M cached input tokens
$0.05$0.0375
Web search
per call when invoked
$0.01
Compare on the full pricing page

How to call the MiniMax M4 API

MiniMax M4 serves the OpenAI-compatible Chat Completions API. Point any OpenAI SDK at https://api.empiriolabs.ai/v1 with your EmpirioLabs API key and use the model id minimax-m4. Get an API key from the EmpirioLabs dashboard.

cURL
curl https://api.empiriolabs.ai/v1/chat/completions \
  -H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-m4",
    "messages": [
      {"role": "user", "content": "Write a haiku about the ocean."}
    ]
  }'
Python (OpenAI SDK)
from openai import OpenAI

client = OpenAI(
    base_url="https://api.empiriolabs.ai/v1",
    api_key="YOUR_EMPIRIOLABS_API_KEY",
)

response = client.chat.completions.create(
    model="minimax-m4",
    messages=[{"role": "user", "content": "Write a haiku about the ocean."}],
)
print(response.choices[0].message.content)
Full MiniMax M4 API reference

MiniMax M4 API parameters

Request parameters supported by the MiniMax M4 API on EmpirioLabs. Defaults apply when a field is omitted.

ParameterTypeDefaultRange / valuesDescription
reasoning_effortenummaxlow, medium, high, xhigh, maxReasoning is always on; this sets how much effort the model spends before answering. Higher effort uses more reasoning tokens.
max_completion_tokensinteger-1 to 262144Maximum generated tokens, including reasoning tokens. When omitted, the model's own default applies.
stoparray--Optional stop sequence or list of stop sequences.
tool_web_searchbooleanfalse-Search the web for real-time information. Adds $0.01 to the request cost for each invoked call.
toolsarray--OpenAI-compatible tool definitions for function calling.
tool_choiceobject--Optional OpenAI-compatible tool_choice value. This model supports auto and none.
video_fpsnumber10.2 to 5Frames per second to sample from video inputs. Higher values sample more frames and use more input tokens.
disable_formattingbooleanfalse-Return the answer without the Sources list that web search adds.

Good to know

Text, image, and video input with text output, a 1M token context, and up to 262,144 output tokens. Image and video parts accept detail (low, default, or high) and max_long_side_pixel, which set the resolution the model reads and the input tokens billed; with tool_web_search on, max_long_side_pixel applies to video only. The model always reasons: reasoning_effort sets how deeply (low, medium, high, xhigh, or max; the default is max), and the reasoning text is returned in reasoning_content. Reasoning tokens are billed as output tokens. In multi-step tool use, send each assistant turn back with its reasoning_content; it is billed as input tokens. Repeated prompt prefixes are cached automatically and billed at the cached input rate. Set tool_web_search to true to let the model search the web; each executed search is billed, and one request can run several searches. Answers that used web search end with a Sources list unless disable_formatting is true. tool_choice accepts auto or none. Structured output through response_format is not supported; ask for JSON in the prompt instead.

Per-tool billing (usage.tool_usage)

When this model invokes tools (web search, code interpreter, etc.) inside a single request, the response carries a normalized usage.tool_usage map alongside the token counts. The example below shows the shape, exact field names, units, and which tools appear can vary slightly per provider:

"usage": {
  "prompt_tokens": 123,
  "completion_tokens": 456,
  "cost_usd": 0.0042,
  "tool_usage": {"web_search": 3, "code_interpreter": 1}
}

The tool counts are already factored into cost_usd, they are surfaced for transparency so you can audit per-tool billing. The field is omitted when no tools were invoked.

MiniMax M4 API: common questions

How much does the MiniMax M4 API cost?

On EmpirioLabs, MiniMax M4 is billed pay as you go. You can also choose a plan with weekly allowances. The live rate card on this page always matches what the API charges.

What inputs and outputs does MiniMax M4 support?

MiniMax M4 takes Text, Image, Video as input and returns Text.

What is the context window of MiniMax M4?

MiniMax M4 supports a 1M-token context window with up to 262,144 output tokens per response.

Is the MiniMax M4 API OpenAI-compatible?

Yes. MiniMax M4 serves the OpenAI-compatible Chat Completions API, so existing OpenAI SDKs work by pointing base_url at https://api.empiriolabs.ai/v1 and setting the model id to minimax-m4.

What is the model ID for MiniMax M4?

Send minimax-m4 as the model in your request. The alternate IDs minimax/m4, minimax/minimax-m4 also work.

When was MiniMax M4 released?

MiniMax released MiniMax M4 on Dec 3, 2026.

Where is MiniMax M4 served from?

MiniMax M4 on EmpirioLabs is served from Singapore.

Can I try MiniMax M4 in the browser before integrating?

Yes. The EmpirioLabs playground runs MiniMax M4 in the browser with the same parameters the API exposes, so you can test prompts before writing code.

How do I get a MiniMax M4 API key?

Create an EmpirioLabs account, then generate a key under API Keys in the dashboard. Billing is pay-as-you-go credits, so you only pay for the requests you make. You can also choose a plan with weekly allowances.

Compare MiniMax M4 with other models

All model comparisons

Ready to use better endpoints?

Check out our pricing or reach out if you want your own model deployed on our stack.