> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MiniMax-M3

> MiniMax M3 through AnyFast's OpenAI-compatible chat completions API, with long context, multimodal understanding, thinking, and tool calling.

MiniMax-M3 is MiniMax's M-series model for coding, agentic workflows, long-context tasks, and multimodal understanding. Through AnyFast, call it with the OpenAI-compatible `POST /v1/chat/completions` endpoint.

## Key capabilities

* **1M-token context** — Handle long documents, repositories, and multi-turn conversations.
* **Coding and agents** — Supports tool calls and multi-step reasoning workflows.
* **Native multimodality** — Accepts text, image, and video content in messages.
* **Adaptive thinking** — Thinking is enabled by default for M3; use `thinking` to control it.
* **Reasoning output control** — Use `reasoning_split` to separate reasoning into dedicated response fields.
* **Streaming** — Receive incremental output with Server-Sent Events by setting `stream` to `true`.
* **Priority service** — Choose `service_tier: "priority"` when your account has priority access.

## Model ID

Use the official model ID `MiniMax-M3` in the request body.

## Quick example

```bash cURL theme={null}
curl --request POST \
  --url https://www.anyfast.ai/v1/chat/completions \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "MiniMax-M3",
  "messages": [
    {
      "role": "user",
      "content": "Explain how a compiler works in simple terms."
    }
  ],
  "thinking": {
    "type": "adaptive"
  },
  "max_completion_tokens": 2048,
  "stream": false
}
'
```

## Multimodal input

Put text, image, or video parts in a message's `content` array. Use a publicly accessible URL for `image_url` or `video_url`.

```json theme={null}
{
  "model": "MiniMax-M3",
  "messages": [
    {
      "role": "user",
      "content": [
        { "type": "text", "text": "Describe this image." },
        {
          "type": "image_url",
          "image_url": { "url": "https://example.com/image.jpg" }
        }
      ]
    }
  ]
}
```

## Thinking and reasoning

When `thinking` is omitted, MiniMax-M3 uses adaptive thinking by default. Set `thinking.type` to `adaptive` to enable adaptive thinking or `disabled` to skip thinking. The `reasoning_split` flag changes the response format; it does not turn thinking on or off.

For M2.x models, thinking cannot be disabled. This page documents M3; use the model-specific page when calling another MiniMax model.

## Streaming

Set `stream` to `true` to receive Server-Sent Events. Streaming responses use the OpenAI-compatible `chat.completion.chunk` object type.

```bash cURL theme={null}
curl --request POST \
  --url https://www.anyfast.ai/v1/chat/completions \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "MiniMax-M3",
    "messages": [{"role": "user", "content": "Write a short haiku about rain."}],
    "stream": true
  }'
```

## Token limits

For MiniMax-M3, the recommended `max_completion_tokens` value is 131072 and the maximum is 524288. The official API also accepts the legacy `max_tokens` field, but it is deprecated; use `max_completion_tokens` for new integrations.

<Card title="API Reference" icon="code" href="/api-reference/model-api/minimax/minimax-m3">
  View the interactive API reference for MiniMax-M3.
</Card>

<script src="/public/feedback.js" />
