文档

语音合成(MiMo-TTS 系列)- OpenAI API 兼容

请求地址

https://api.xiaomimimo.com/v1/chat/completions

请求头

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

api-key: $MIMO_API_KEY
Content-Type: application/json
Authorization: Bearer $MIMO_API_KEY
Content-Type: application/json

请求体

Chat 响应对象(非流式输出)

Chat 响应 chunk 对象(流式输出)

curl --location --request POST 'https://api.xiaomimimo.com/v1/chat/completions' \
--header "api-key: $MIMO_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "mimo-v2.5-tts",
    "messages": [
        {
            "role": "user",
            "content": "Bright, bouncy, slightly sing-song tone — like you are bursting with good news you can barely hold in. Fast pace, rising pitch at the end."
        },
        {
            "role": "assistant",
            "content": "Hey boss — guess what, guess what? I just got the results back and I actually passed! Not just passed, I got a distinction! I know, I know — you told me I was cutting it close, but hey, here we are. Drinks are on me tonight, okay?"
        }
    ],
    "audio": {
        "format": "wav",
        "voice": "mimo_default"
    }
}'
响应
{
    "id": "6ebed286b58546f6b87fa7fa9d0e806b",
    "choices": [
        {
            "finish_reason": "stop",
            "index": 0,
            "message": {
                "content": "",
                "role": "assistant",
                "audio": {
                    "id": "979a91904f9a4143928d9e1f54837b4f",
                    "data": "base64Data",
                    "expires_at": null,
                    "transcript": null
                },
                "tool_calls": null
            }
        }
    ],
    "created": 1776954802,
    "model": "mimo-v2.5-tts",
    "object": "chat.completion",
    "usage": {
        "completion_tokens": 97,
        "prompt_tokens": 213,
        "total_tokens": 310,
        "completion_tokens_details": {
            "reasoning_tokens": 0
        },
        "prompt_tokens_details": {
            "cached_tokens": 109
        }
    }
}
更新时间 2026 年 07 月 17 日

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.