Documentation

Speech Recognition (MiMo‑V2.5-ASR) - OpenAI API Compatibility

Request Address

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

Request Headers

The API supports the following two authentication methods. Please choose one and add it to the request headers:

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

Request body

  • messagesarrayRequired
    The message list.
    Hide child attributes
    Messages sent by an end user.
    Hide child attributes
    messages.contentarrayRequired
    The contents of the user message.
    For detailed usage, please refer to Speech Recognition.
    Hide child attributes
    An array of content parts with a defined type. For speech recognition, only single audio input is supported.
    Hide child attributes
    Hide child attributes
    messages.content.input_audioobjectRequired
    When audio is passed via data URL, the format field is optional. If only Base64-encoded audio data is provided, the format field is required. If both MIME_TYPE and format are included, their values must match.
    Hide child attributes
    messages.content.input_audio.datastringRequired
    Base64 encoded audio in a data URL. Input audio only supports mp3 and wav formats:
    • mp3: valid MIME_TYPE values: audio/mpeg, audio/mp3
    • wav: valid MIME_TYPE value: audio/wav
    messages.content.input_audio.formatstring
    The format for encoding audio data.
    Available options: mp3, wav
    messages.content.typestringRequired
    The type of the content part.
    Available options: input_audio
    messages.rolestringRequired
    Role of the message author.
    Available options: user
  • modelstringRequired
    Model ID is used to generate the response.
    Available options: mimo-v2.5-asr
  • asr_optionsobject
    Custom configuration parameters for automatic speech recognition (ASR).
    Hide child attributes
    asr_options.languagestringDefault: auto
    Specify a single language for audio recognition.
    • auto: Auto‑detect audio language
    • zh: Chinese
    • en: English
    Available options: auto, zh, en
  • streambooleanDefault: false
    If set to true, the model response data will be streamed to the client as it is generated using server-sent events.

Chat response object (non-streaming output)

  • choicesarray
    A list of chat completion choices.
    Hide child attributes
    choices.finish_reasonstring
    The reason the model stopped generating tokens:
    • stop: The model reached a natural stop point or a user‑provided stop sequence
    • length: Terminated due to exceeding the model's maximum generation length
    • content_filter: Content was omitted due to a content filter flag
    choices.indexinteger
    The index of the choice in the list of choices.
    choices.messageobject
    A chat completion message generated by the model.
    Hide child attributes
    choices.message.contentstring
    The contents of the message.
    choices.message.rolestring
    The role of the author of this message.
  • createdinteger
    The Unix timestamp (in seconds) of when the chat completion was created.
  • idstring
    A unique identifier for the chat completion.
  • modelstring
    The model to generate the completion.
  • objectstring
    The object type, which is always chat.completion.
  • usageobject | null
    Usage statistics for the completion request.
    Hide child attributes
    usage.completion_tokensinteger
    Number of tokens in the generated completion.
    usage.prompt_tokensinteger
    Number of tokens in the prompt.
    usage.total_tokensinteger
    Total number of tokens used in the request (prompt + completion).
    usage.completion_tokens_detailsobject
    Breakdown of tokens used in a completion.
    Hide child attributes
    usage.completion_tokens_details.reasoning_tokensinteger
    Tokens generated by the model for reasoning. Always 0.
    usage.prompt_tokens_detailsobject
    Breakdown of tokens used in the prompt.
    Hide child attributes
    usage.prompt_tokens_details.cached_tokensinteger
    Number of tokens served from cache.
    usage.prompt_tokens_details.audio_tokensinteger
    Audio input tokens present in the prompt.
    usage.secondsinteger
    Audio duration (seconds).

Chat response chunk object (streaming output)

  • choicesarray
    A list of chat completion choices.
    Hide child attributes
    choices.deltaobject
    A chat completion delta generated by streamed model responses.
    Hide child attributes
    choices.delta.contentstring
    The contents of the chunk message.
    choices.delta.rolestring
    The role of the author of this message.
    choices.finish_reasonstring | null
    The reason the model stopped generating tokens:
    • stop: The model reached a natural stop point or a user‑provided stop sequence
    • length: Terminated due to exceeding the model's maximum generation length
    • content_filter: Content was omitted due to a content filter flag
    choices.indexinteger
    The index of the choice in the list of choices.
  • createdinteger
    The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
  • idstring
    A unique identifier for the chat completion. Each chunk has the same ID.
  • modelstring
    The model to generate the completion.
  • objectstring
    The object type, which is always chat.completion.chunk.
  • usageobject | null
    Usage statistics for the completion request.
    Hide child attributes
    usage.completion_tokensinteger
    Number of tokens in the generated completion.
    usage.prompt_tokensinteger
    Number of tokens in the prompt.
    usage.total_tokensinteger
    Total number of tokens used in the request (prompt + completion).
    usage.completion_tokens_detailsobject
    Breakdown of tokens used in a completion.
    Hide child attributes
    usage.completion_tokens_details.reasoning_tokensinteger
    Tokens generated by the model for reasoning. Always 0.
    usage.prompt_tokens_detailsobject
    Breakdown of tokens used in the prompt.
    Hide child attributes
    usage.prompt_tokens_details.cached_tokensinteger
    Number of tokens served from cache.
    usage.prompt_tokens_details.audio_tokensinteger
    Audio input tokens present in the prompt.
    usage.secondsinteger
    Audio duration (seconds).
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"
    }
}'
response
{
    "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
    }
}
Update Time July 17, 2026

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.