文档

Responses API 兼容

MiMo 提供兼容 OpenAI Responses API 格式的调用接口,本文将对请求参数、响应结构和代码示例进行说明。

兼容性说明与限制:

本接口对齐 OpenAI Responses API 规范,便于开发者快速适配集成;仅文档说明参数会正常处理,未定义参数会被过滤并可能返回请求异常,具体差异化约束见下文。

  • 不兼容参数:暂不支持 backgroundprevious_response_idcontext_management 等字段,请求中携带此类参数会被忽略或触发报错。

  • 推理档位控制reasoning.effort 控制模型推理:none 关闭思考;low / medium / high 均开启推理,各档位效果一致,暂不区分推理强度。

请求地址

https://api.xiaomimimo.com/v1/responses

请求头

接口支持以下两种认证方式,请选择其中一种添加到请求头中:

  1. 方式一:api-key 字段认证,格式:
api-key: $MIMO_API_KEY
Content-Type: application/json
  1. 方式二:Authorization: Bearer 认证,格式:
Authorization: Bearer $MIMO_API_KEY
Content-Type: application/json

请求体

Response 对象(非流式输出)

Response chunk 对象(流式输出)

当你创建响应并将 stream 设为 true 时,服务端会在响应生成过程中向客户端推送服务端发送事件(SSE)。

response.created

响应创建时触发的事件。

response.in_progress

响应处于生成中状态时触发。

response.completed

模型响应生成完成时触发。

response.incomplete

响应以未完成状态结束时触发该事件。

response.output_item.added

当新增一条输出项时触发。

response.output_item.done

当某条输出项标记为完成时触发。

response.content_part.added

新增内容片段时触发。

response.content_part.done

内容片段生成完成时触发。

response.output_text.delta

产生增量文本片段时触发。

response.output_text.done

文本内容最终生成完成时触发。

response.function_call_arguments.delta

产生函数调用参数增量片段时触发。

response.function_call_arguments.done

函数调用参数最终生成完成时触发。

response.reasoning_text.delta

推理文本产生增量片段时触发。

response.reasoning_text.done

推理文本生成完成时触发。

curl --location --request POST 'https://api.xiaomimimo.com/v1/responses' \
--header "api-key: $MIMO_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "mimo-v2.5-pro",
    "instructions": "You are MiMo, an AI assistant developed by Xiaomi. Today is date: Tuesday, December 16, 2025. Your knowledge cutoff date is December 2024.",
    "input": "please introduce yourself",
    "max_output_tokens": 1024,
    "stream": false,
    "reasoning": {
        "effort": "none"
    }
}'
响应
{
    "id": "resp_5fcaac1af26a4b449f30e1eeeaa8c48f",
    "object": "response",
    "created_at": 1782215659,
    "status": "completed",
    "error": null,
    "incomplete_details": null,
    "model": "mimo-v2.5-pro",
    "metadata": null,
    "output": [
        {
            "id": "msg_1fa8f5011ebf47adb158ecf13c99d06c",
            "type": "message",
            "status": "completed",
            "role": "assistant",
            "content": [
                {
                    "type": "output_text",
                    "text": "Hello! I am MiMo, a large language model developed by Xiaomi's LLM Core Team. I'm here to help answer your questions, generate text, and assist with various tasks. How can I assist you today?",
                    "annotations": []
                }
            ]
        }
    ],
    "output_text": "Hello! I am MiMo, a large language model developed by Xiaomi's LLM Core Team. I'm here to help answer your questions, generate text, and assist with various tasks. How can I assist you today?",
    "usage": {
        "input_tokens": 57,
        "input_tokens_details": {},
        "output_tokens": 46,
        "output_tokens_details": {
            "reasoning_tokens": 0
        },
        "total_tokens": 103
    }
}
更新时间 2026 年 06 月 24 日

Copyright©2026 Xiaomi. All Rights Reserved | Cookie Policy | Cookie Preferences

We use cookies and similar technologies of our own to ensure the proper functioning of the website, customize content according to user preferences and analyze users' interactions on the website, as well as their browsing habits. You can find more information in our Cookie Policy. Select an option or go to Cookie Settings to manage your preferences. Learn More.