
Multimodal flagship for long-horizon coding and agents with 1M context, adjustable reasoning depth, image and video input, and built-in web search.
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.
minimax-m4/v1/chat/completionsPOST/v1/responsesPOST/v1/messagesPOST/v1beta/models/minimax-m4:generateContentminimax/m4minimax/minimax-m4Tarifas pay-as-you-go ao vivo do catálogo EmpirioLabs. Você também pode escolher um plano com franquias semanais.
MiniMax M4 atende a API Chat Completions compatível com OpenAI. Aponte qualquer SDK OpenAI para https://api.empiriolabs.ai/v1 com sua chave de API EmpirioLabs e use o id de modelo minimax-m4. Obtenha uma chave de API no painel EmpirioLabs.
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."}
]
}'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)Parâmetros de requisição suportados pela API MiniMax M4 na EmpirioLabs. Os padrões valem quando um campo é omitido.
| Parâmetro | Tipo | Padrão | Intervalo / valores | Descrição |
|---|---|---|---|---|
| reasoning_effort | enum | max | low, medium, high, xhigh, max | Reasoning is always on; this sets how much effort the model spends before answering. Higher effort uses more reasoning tokens. |
| max_completion_tokens | integer | - | 1 a 262144 | Maximum generated tokens, including reasoning tokens. When omitted, the model's own default applies. |
| stop | array | - | - | Optional stop sequence or list of stop sequences. |
| tool_web_search | boolean | false | - | Search the web for real-time information. Adds $0.01 to the request cost for each invoked call. |
| tools | array | - | - | OpenAI-compatible tool definitions for function calling. |
| tool_choice | object | - | - | Optional OpenAI-compatible tool_choice value. This model supports auto and none. |
| video_fps | number | 1 | 0.2 a 5 | Frames per second to sample from video inputs. Higher values sample more frames and use more input tokens. |
| disable_formatting | boolean | false | - | 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.
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.
Na EmpirioLabs, MiniMax M4 é cobrado por uso. Você também pode escolher um plano com franquias semanais. A tabela de tarifas ao vivo desta página sempre corresponde ao que a API cobra.
O MiniMax M4 recebe Texto, Imagem, Vídeo como entrada e retorna Texto.
MiniMax M4 suporta uma janela de contexto de 1M tokens com até 262.144 tokens de saída por resposta.
Sim. MiniMax M4 atende a API Chat Completions compatível com OpenAI, então SDKs OpenAI existentes funcionam apontando base_url para https://api.empiriolabs.ai/v1 e definindo o id de modelo minimax-m4.
Envie minimax-m4 como modelo na sua requisição. Os IDs alternativos minimax/m4, minimax/minimax-m4 também funcionam.
MiniMax lançou o MiniMax M4 em 3 de dez. de 2026.
No EmpirioLabs, o MiniMax M4 é servido a partir de Singapore.
Sim. O playground da EmpirioLabs executa MiniMax M4 no navegador com os mesmos parâmetros que a API expõe, para você testar prompts antes de escrever código.
Crie uma conta EmpirioLabs e gere uma chave em API Keys no painel. A cobrança usa créditos pay-as-you-go, então você paga apenas pelas requisições que faz. Você também pode escolher um plano com franquias semanais.
Confira nossos preços ou entre em contato se quiser que seu próprio modelo seja implementado em nossa pilha.