MiniMax M4

POST /v1/chat/completionsMultimodal flagship for long-horizon coding and agents with 1M context, adjustable reasoning depth, image and video input, and built-in web search.
See MiniMax M4 pricing and specs or try it in the Playground.
At a glance
Pricing
Example request
Parameters
Notes
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:
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.
Machine-readable schema: GET https://api.empiriolabs.ai/v1/models/minimax-m4.
