> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.empiriolabs.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.empiriolabs.ai/_mcp/server.

# 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.

![MiniMax M4](https://media.empiriolabs.ai/model-logos/minimax.png)

[MiniMax](/providers/minimax) · Text Generation

`POST /v1/chat/completions`

Multimodal 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](https://empiriolabs.ai/models/minimax-m4) or [try it in the Playground](https://platform.empiriolabs.ai/dashboard/playground?model=minimax-m4).

## At a glance

| Field               | Value                                                                                                                    |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Model id            | `minimax-m4`                                                                                                             |
| Model release date  | 2026-12-03                                                                                                               |
| Input modalities    | Text, Image, Video                                                                                                       |
| Output modalities   | Text                                                                                                                     |
| Context window      | 1M                                                                                                                       |
| Weight precision    | -                                                                                                                        |
| Max output tokens   | 262,144                                                                                                                  |
| Region              | Singapore                                                                                                                |
| Features            | reasoning, vision, video, web_search, function_calling, cache, long_context, agentic_coding                              |
| Native inference    | No                                                                                                                       |
| New                 | Yes                                                                                                                      |
| Structured output   | Not supported                                                                                                            |
| Supported endpoints | `POST /v1/chat/completions`, `POST /v1/responses`, `POST /v1/messages`, `POST /v1beta/models/minimax-m4:generateContent` |
| Alternate model ids | `minimax/m4`, `minimax/minimax-m4`                                                                                       |

## Pricing

| Charge              | 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              |

## Example request

```bash
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":"Hello"}]}'
```

## Parameters

| Parameter               | Type    | Required | Default | Description                                                                                                                                                                       |
| ----------------------- | ------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `reasoning_effort`      | enum    | no       | `"max"` | Reasoning is always on; this sets how much effort the model spends before answering. Higher effort uses more reasoning tokens. · Allowed: `low`, `medium`, `high`, `xhigh`, `max` |
| `max_completion_tokens` | integer | no       | -       | Maximum generated tokens, including reasoning tokens. When omitted, the model's own default applies. · Range: 1 – 262144                                                          |
| `stop`                  | array   | no       | -       | Optional stop sequence or list of stop sequences.                                                                                                                                 |
| `tool_web_search`       | boolean | no       | false   | Search the web for real-time information. Adds \$0.01 to the request cost for each invoked call.                                                                                  |
| `tools`                 | array   | no       | -       | OpenAI-compatible tool definitions for function calling.                                                                                                                          |
| `tool_choice`           | object  | no       | -       | Optional OpenAI-compatible tool_choice value. This model supports auto and none.                                                                                                  |
| `video_fps`             | number  | no       | `1`     | Frames per second to sample from video inputs. Higher values sample more frames and use more input tokens. · Range: 0.2 – 5                                                       |
| `disable_formatting`    | boolean | no       | false   | Return the answer without the Sources list that web search adds.                                                                                                                  |

## 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:

```json
"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.

---

*Machine-readable schema:* `GET https://api.empiriolabs.ai/v1/models/minimax-m4`.