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

> MiniMax-M2.7 flagship text model via AnyFast OpenAI-compatible API. Advanced reasoning with recursive self-improvement.

MiniMax-M2.7 is MiniMax's flagship text model, available through AnyFast via an OpenAI-compatible interface. It features 204K context and interleaved thinking for complex reasoning tasks.

## Key capabilities

* **OpenAI-compatible** — Works as a drop-in replacement with the OpenAI SDK
* **204K context** — Handles large documents and multi-turn conversations
* **Thinking/Reasoning** — Interleaved thinking support for complex reasoning
* **Tool calling** — Supports function/tool calls for agentic workflows
* **Text-only** — Optimized for text and tool calls (no image/video input)

## Quick example

<CodeGroup>
  ```bash cURL theme={null}
  curl https://www.anyfast.ai/v1/chat/completions \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "MiniMax-M2.7",
      "messages": [
        { "role": "user", "content": "Explain quantum entanglement in simple terms." }
      ]
    }'
  ```

  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="YOUR_API_KEY",
      base_url="https://www.anyfast.ai/v1"
  )

  response = client.chat.completions.create(
      model="MiniMax-M2.7",
      messages=[
          {"role": "user", "content": "Explain quantum entanglement in simple terms."}
      ]
  )

  print(response.choices[0].message.content)
  ```

  ```python Streaming theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="YOUR_API_KEY",
      base_url="https://www.anyfast.ai/v1"
  )

  stream = client.chat.completions.create(
      model="MiniMax-M2.7",
      messages=[
          {"role": "user", "content": "Write a short poem about the sea."}
      ],
      stream=True
  )

  for chunk in stream:
      print(chunk.choices[0].delta.content or "", end="")
  ```
</CodeGroup>

## Parameters

| Parameter     | Type            | Required | Description                                                   |
| ------------- | --------------- | -------- | ------------------------------------------------------------- |
| `model`       | string          | Yes      | Must be `MiniMax-M2.7`                                        |
| `messages`    | array           | Yes      | List of `{ role, content }` objects. Text and tool calls only |
| `max_tokens`  | integer         | No       | Maximum tokens to generate                                    |
| `temperature` | float           | No       | `0`–`2`. Controls randomness. Default: `1`                    |
| `stream`      | boolean         | No       | Enable SSE streaming. Default: `false`                        |
| `top_p`       | float           | No       | Nucleus sampling threshold. Default: `0.9`                    |
| `stop`        | string / array  | No       | Sequences that stop generation                                |
| `tools`       | array           | No       | Tool/function definitions for agentic workflows               |
| `tool_choice` | string / object | No       | Tool selection strategy                                       |

<Card title="API Reference" icon="code" href="/api-reference/model-api/minimax/minimax-m2.7">
  View the interactive API playground for MiniMax-M2.7.
</Card>

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