语音识别(MiMo‑V2.5-ASR)- OpenAI API 兼容

请求地址

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

请求头

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

  1. 方式一:api-key 字段认证,格式:

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

    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-asr",
    "messages": [
        {
            "role": "user",
            "content": [
                {
                    "type": "input_audio",
                    "input_audio": {
                        "data": "data:{MIME_TYPE};base64,$BASE64_AUDIO"
                    }
                }
            ]
        }
    ],
    "asr_options": {
        "language": "auto"
    }
}'
响应
{
    "id": "9f51eba459dd4dfdabb31cabba0cb7dc",
    "choices": [
        {
            "finish_reason": "stop",
            "index": 0,
            "message": {
                "content": "Good morning. Could you tell me what the weather will be like today?",
                "role": "assistant",
                "audio": null,
                "tool_calls": null,
                "audio_tokens": []
            }
        }
    ],
    "created": 1780398283,
    "model": "mimo-v2.5-asr",
    "object": "chat.completion",
    "usage": {
        "completion_tokens": 20,
        "prompt_tokens": 46,
        "total_tokens": 66,
        "completion_tokens_details": {
            "reasoning_tokens": 0
        },
        "prompt_tokens_details": {
            "audio_tokens": 25,
            "cached_tokens": 45
        },
        "seconds": 4
    }
}
更新时间 2026 年 06 月 02 日
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.