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

# MiniMax

> MiniMax 的文本模型：可用型号、调用示例与计费方式。

MiniMax 的文本模型，擅长 Agent 任务、编程和电脑操作，上下文最长 100 万 token。

* 接口：`POST https://token.poryf.com/v1/chat/completions`（OpenAI 格式），字段说明见 [创建对话](https://docs.token.poryf.com/api/chat.md)
* 在线试用需要登录，按自己的余额扣费

## 可用型号

| 模型 ID | 说明 | 链接 |
| - | - | - |
| `MiniMax-M3.1-Flash` | 新一代 Flash 模型，速度快、价格低，始终开启思考 | [价格](https://token.poryf.com/pricing/MiniMax-M3.1-Flash) · [试用](https://token.poryf.com/model-guide/MiniMax-M3.1-Flash) |

型号会随渠道调整增减，以 [模型广场](https://token.poryf.com/pricing) 和 [GET /v1/models](https://docs.token.poryf.com/api/list-models.md) 为准。

## 调用示例

```bash curl theme={null}
curl https://token.poryf.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-M3.1-Flash",
    "messages": [
      { "role": "user", "content": "用三句话介绍一下你自己" }
    ],
    "max_tokens": 2048
  }'
```

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

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://token.poryf.com/v1",
)

response = client.chat.completions.create(
    model="MiniMax-M3.1-Flash",
    messages=[{"role": "user", "content": "用三句话介绍一下你自己"}],
    max_tokens=2048,
)
print(response.choices[0].message.content)
```

换成其他型号，只需替换 `model`。需要逐字输出时加 `"stream": true`，见 [流式输出](https://docs.token.poryf.com/streaming.md)。

## 思考强度

`MiniMax-M3.1-Flash` 始终开启思考，思考过程在 `reasoning_content` 字段返回。

* 用 `reasoning_effort` 调节思考强度：`low`、`medium`、`high`、`xhigh`、`max`，不传时为 `max`。
* 不能关闭思考。传 `reasoning_effort: "none"` 或 `"minimal"`、`thinking: {"type": "disabled"}` 时，本站按 `low` 处理，不会报错。

## 计费

* 按输入、输出、缓存命中 token 分别计价，只有一档单价，不分时段。

实时单价见 [模型广场](https://token.poryf.com/pricing)，每次调用的实际用量与扣费见 [使用日志](https://token.poryf.com/usage-logs/common)。

> [!NOTE]
>
> * `max_tokens` 包含思考过程。推理型号设得太小时，额度可能全部用于思考，`content` 为空。
> * 本站文本模型目前不支持在对话中识别图片。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.