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 Génération de texte 1M contexte Publié 3 déc. 2026 Singapore Endpoint propriétaire Nouveau

À propos de 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 contexte agentic coding

Caractéristiques de MiniMax M4

ID du modèle
minimax-m4
Auteur
MiniMax
Catégorie
Génération de texte
Publié
3 déc. 2026
Fenêtre de contexte
1M tokens
Sortie max
262 144 tokens
Entrée
TexteImageVidéo
Sortie
Texte
Sortie structurée
Non pris en charge
Région
Singapore
Endpoints
POST/v1/chat/completionsPOST/v1/responsesPOST/v1/messagesPOST/v1beta/models/minimax-m4:generateContent
Identifiants de modèle alternatifs
minimax/m4minimax/minimax-m4

Tarifs de l'API MiniMax M4Économisez jusqu'à 25%

Tarifs à l'usage en direct du catalogue EmpirioLabs. Vous pouvez aussi choisir un forfait avec des quotas hebdomadaires.

Type
Spéc.
Tarif
Entrée
per 1M prompt tokens
$0.80$0.60
Sortie
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
Comparer sur la page complète des tarifs

Comment appeler l'API MiniMax M4

MiniMax M4 sert l'API Chat Completions compatible OpenAI. Pointez n'importe quel SDK OpenAI vers https://api.empiriolabs.ai/v1 avec votre clé API EmpirioLabs et utilisez l'id de modèle minimax-m4. Obtenez une clé API depuis le tableau de bord EmpirioLabs.

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)
Référence complète de l'API MiniMax M4

Paramètres de l'API MiniMax M4

Paramètres de requête pris en charge par l'API MiniMax M4 sur EmpirioLabs. Les valeurs par défaut s'appliquent quand un champ est omis.

ParamètreTypePar défautPlage / valeursDescription
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.

Bon à savoir

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.

API MiniMax M4 : questions fréquentes

Combien coûte l'API MiniMax M4 ?

Sur EmpirioLabs, MiniMax M4 est facturé à l'usage. Vous pouvez aussi choisir un forfait avec des quotas hebdomadaires. La grille tarifaire en direct de cette page correspond toujours à ce que l'API facture.

Quelles entrées et sorties MiniMax M4 prend-il en charge ?

MiniMax M4 accepte en entrée Texte, Image, Vidéo et renvoie Texte.

Quelle est la fenêtre de contexte de MiniMax M4 ?

MiniMax M4 prend en charge une fenêtre de contexte de 1M tokens avec jusqu'à 262 144 tokens de sortie par réponse.

L'API MiniMax M4 est-elle compatible OpenAI ?

Oui. MiniMax M4 sert l'API Chat Completions compatible OpenAI : les SDKs OpenAI existants fonctionnent en pointant base_url vers https://api.empiriolabs.ai/v1 et en utilisant l'id de modèle minimax-m4.

Quel est l'identifiant de modèle de MiniMax M4 ?

Envoyez minimax-m4 comme modèle dans votre requête. Les identifiants alternatifs minimax/m4, minimax/minimax-m4 fonctionnent aussi.

Quand MiniMax M4 est-il sorti ?

MiniMax a lancé MiniMax M4 le 3 déc. 2026.

D'où MiniMax M4 est-il servi ?

Sur EmpirioLabs, MiniMax M4 est servi depuis Singapore.

Puis-je essayer MiniMax M4 dans le navigateur avant d'intégrer ?

Oui. Le playground EmpirioLabs exécute MiniMax M4 dans le navigateur avec les mêmes paramètres que l'API expose, pour tester vos prompts avant d'écrire du code.

Comment obtenir une clé API MiniMax M4 ?

Créez un compte EmpirioLabs, puis générez une clé sous API Keys dans le tableau de bord. La facturation utilise des crédits à l'usage : vous ne payez que vos requêtes. Vous pouvez aussi choisir un forfait avec des quotas hebdomadaires.

Comparer MiniMax M4 à d'autres modèles

Toutes les comparaisons de modèles

Prêt à utiliser de meilleurs points de terminaison ?

Consultez nos tarifs ou contactez-nous si vous souhaitez que votre propre modèle soit déployé sur notre stack.