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

# 小米 MiMo 对话 API

> 小米 MiMo-V2.6 对话模型（Flash 与 Pro）通过 VibeToken 提供，兼容 OpenAI 的对话补全接口，支持推理、工具调用与图像输入。

## 概述

小米 MiMo 对话模型现已上线 VibeToken，通过标准的兼容 OpenAI 的对话补全接口提供服务，支持流式输出与工具调用。两款 MiMo-V2.6 模型都是开放权重的推理模型，拥有 100 万 token 上下文窗口，原生支持图像理解：

* **MiMo-V2.6-Pro** —— 小米旗舰模型，面向复杂项目、长程 Agent 与研究任务。
* **MiMo-V2.6-Flash** —— 高性价比档位，面向大批量任务。

| | |
| - | - |
| **提供方** | Xiaomi |
| **模型系列** | `mimo-v2.6` |
| **模态** | 对话 |
| **输入** | 文本、图像 |
| **输出** | 文本 |

## 模型

| 模型 ID | 上下文窗口 | 最大输出 token | 输入 |
| - | - | - | - |
| `xiaomi/mimo-v2.6-pro` | 1,048,576 | 131,072 | 文本、图像 |
| `xiaomi/mimo-v2.6-flash` | 1,048,576 | 131,072 | 文本、图像 |

本页不再列出价格。费率按模型配置在 VibeToken 目录中,并且可以按账号单独覆盖,
任何抄写到文档里的数字都会在下一次调价后失效。请通过 [Models API](https://docs.vibetoken.cn/zh/api-reference/models.md)
获取任一模型的实时费率:

```http theme={null}
GET /api/models/{model}/pricing
```

模型 ID 中的斜杠需要 URL 编码 —— 例如 `xiaomi%2Fmimo-v2.6-pro`。
按 token 计费：输入与输出 token 按该模型的费率计费，推理 token 计入输出，图像按输入 token 计费。

## 接口端点

```http theme={null}
POST https://vibetoken.cn/v1/chat/completions
```

与 OpenAI 的[对话补全 API](https://platform.openai.com/docs/api-reference/chat) 无缝兼容 ——
只需将你现有的 OpenAI 客户端指向 `https://vibetoken.cn/v1`，并使用你的
VibeToken 密钥即可。所有支持的参数详见完整的[对话补全参考文档](https://docs.vibetoken.cn/zh/api-reference/chat-completions.md)。

## 快速开始

```bash cURL theme={null}
curl https://vibetoken.cn/v1/chat/completions \
  -H "Authorization: Bearer $VIBETOKEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "xiaomi/mimo-v2.6-pro",
    "messages": [
      { "role": "user", "content": "Plan the steps to migrate a REST API to GraphQL." }
    ]
  }'
```

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

client = OpenAI(
    base_url="https://vibetoken.cn/v1",
    api_key=os.environ["VIBETOKEN_API_KEY"],
)

resp = client.chat.completions.create(
    model="xiaomi/mimo-v2.6-flash",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)
```

```javascript Node.js theme={null}
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://vibetoken.cn/v1",
  apiKey: process.env.VIBETOKEN_API_KEY,
});

const resp = await client.chat.completions.create({
  model: "xiaomi/mimo-v2.6-flash",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(resp.choices[0].message.content);
```

设置 `"stream": true` 即可启用 token 流式输出（Server-Sent Events），与 OpenAI API 完全一致。`temperature` 与 `top_p` 照常可用。将 `model` 替换为上表中的任一 id 即可。

## 图像输入

使用标准的 OpenAI content-parts 格式，在文本之外同时发送图像（详见[视觉（多模态）](https://docs.vibetoken.cn/zh/api-reference/chat-completions.md#视觉（多模态）)）：

```bash cURL theme={null}
curl https://vibetoken.cn/v1/chat/completions \
  -H "Authorization: Bearer $VIBETOKEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "xiaomi/mimo-v2.6-flash",
    "messages": [
      { "role": "user", "content": [
        { "type": "text", "text": "Describe this chart in two sentences." },
        { "type": "image_url", "image_url": { "url": "https://example.com/chart.png" } }
      ]}
    ]
  }'
```

```python Python theme={null}
resp = client.chat.completions.create(
    model="xiaomi/mimo-v2.6-flash",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "Describe this chart in two sentences."},
            {"type": "image_url", "image_url": {"url": "https://example.com/chart.png"}},
        ],
    }],
)
print(resp.choices[0].message.content)
```

```javascript Node.js theme={null}
const resp = await client.chat.completions.create({
  model: "xiaomi/mimo-v2.6-flash",
  messages: [{
    role: "user",
    content: [
      { type: "text", text: "Describe this chart in two sentences." },
      { type: "image_url", image_url: { url: "https://example.com/chart.png" } },
    ],
  }],
});
console.log(resp.choices[0].message.content);
```

## 推理

两款模型都会先思考再作答。推理过程通过 `choices[].message.reasoning_content` 返回（流式时为 `delta.reasoning_content`），与 `content` 中的最终回答分开。推理 token 按输出计费，请在 `max_tokens` 中为其预留空间。详见[推理模型](https://docs.vibetoken.cn/zh/api-reference/chat-completions.md#推理模型)。

## 工具调用与 JSON 输出

传入 OpenAI 风格的 `tools` 即可；`tool_choice` 支持 `"auto"`（默认），也支持指定具体函数以强制调用某个工具。

`response_format: {"type": "json_object"}` 可开启 JSON 模式，请同时在提示词中要求输出 JSON。


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