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 文本生成 1M 上下文 发布日期 2026年12月3日 Singapore 专有端点 新

关于 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 上下文 agentic coding

MiniMax M4 规格

模型 ID
minimax-m4
开发方
MiniMax
类别
文本生成
发布日期
2026年12月3日
上下文窗口
1M 个 token
最大输出
262,144 个 token
输入
文本图像视频
输出
文本
结构化输出
不支持
区域
Singapore
端点
POST/v1/chat/completionsPOST/v1/responsesPOST/v1/messagesPOST/v1beta/models/minimax-m4:generateContent
备用模型 ID
minimax/m4minimax/minimax-m4

MiniMax M4 API 价格最高省 25%

来自 EmpirioLabs 目录的实时按量计费价格。也可以选择包含每周用量额度的套餐。

类型
规格
价格
输入
per 1M prompt tokens
$0.80$0.60
输出
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
在完整价格页比较

如何调用 MiniMax M4 API

MiniMax M4 提供 OpenAI 兼容的 Chat Completions API。用你的 EmpirioLabs API 密钥把任意 OpenAI SDK 指向 https://api.empiriolabs.ai/v1,并使用模型 ID minimax-m4。 在EmpirioLabs 控制台获取 API 密钥。

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)
MiniMax M4 API 完整参考

MiniMax M4 API 参数

EmpirioLabs 上 MiniMax M4 API 支持的请求参数。省略字段时使用默认值。

参数类型默认值范围 / 值描述
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 到 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 到 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.

须知

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:常见问题

MiniMax M4 API 收费多少?

在 EmpirioLabs,MiniMax M4 按量计费。也可以选择包含每周用量额度的套餐。本页的实时价格表始终与 API 的实际计费一致。

MiniMax M4 支持哪些输入和输出?

MiniMax M4 接受 文本, 图像, 视频 作为输入,并返回 文本。

MiniMax M4 的上下文窗口有多大?

MiniMax M4 支持 1M token 的上下文窗口,每次响应最多 262,144 个输出 token。

MiniMax M4 API 兼容 OpenAI 吗?

兼容。MiniMax M4 提供 OpenAI 兼容的 Chat Completions API,现有 OpenAI SDK 只需把 base_url 指向 https://api.empiriolabs.ai/v1 并把模型 ID 设为 minimax-m4 即可使用。

MiniMax M4 的模型 ID 是什么?

在请求中将 minimax-m4 作为 model 发送。备用 ID minimax/m4, minimax/minimax-m4 同样可用。

MiniMax M4 是什么时候发布的?

MiniMax 于 2026年12月3日 发布了 MiniMax M4。

MiniMax M4 从哪里提供服务?

EmpirioLabs 上的 MiniMax M4 从 Singapore 提供服务。

集成之前可以在浏览器里试用 MiniMax M4 吗?

可以。EmpirioLabs Playground在浏览器中以与 API 相同的参数运行 MiniMax M4,你可以在写代码之前先测试提示词。

如何获取 MiniMax M4 API 密钥?

创建 EmpirioLabs 账户,然后在控制台的 API Keys生成密钥。计费使用按量付费的额度,只为实际发出的请求付费。也可以选择包含每周用量额度的套餐。

将 MiniMax M4 与其他模型比较

全部模型比较

准备好使用更好的终端了吗?

查看我们的定价,或者如果你想将自己的模型部署到我们的堆栈中,请联系我们。