Documentation

Speech Synthesis (MiMo-TTS Series) - 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 current conversation message list.
    Hide child attributes
    Messages sent by an end user, containing prompts or additional context information.
    Note: When generating audio using the mimo-v2.5-tts-voicedesign model, this message is required and is used to specify the text describing the voice design.
    Hide child attributes
    messages.contentstringRequired
    The contents of the user message.
    messages.rolestringRequired
    Role of the message author.
    Available options: user
  • modelstringRequired
    Model ID is used to generate the response.
    Available options: mimo-v2.5-tts, mimo-v2.5-tts-voicedesign, mimo-v2.5-tts-voiceclone
  • audioobject
    Parameters for audio output. For details, please refer to Speech Synthesis.
    Note: To generate audio, you must add a message with role set to assistant, which needs to specify the text for speech synthesis. Additionally, when using the mimo-v2.5-tts-voicedesign model, a message with the role of user is required. If optimize_text_preview is set to true, the assistant message can be omitted.
    Hide child attributes
    audio.formatstringDefault: wav
    Specifies the output audio format. Default: wav, or pcm when you set stream: true.
    Passing in pcm or pcm16 both indicate specifying the use of the pcm16 format.
    Available options: wav, mp3, pcm, pcm16
    audio.optimize_text_previewbooleanDefault: false
    Enables intelligent optimization of the target audio broadcast text.
    When set to true, the input target text is intelligently polished; if no target text is provided, a broadcast-adapted target text is automatically generated. The finalized processed text is then fed into the model for speech synthesis.
    Note: When this parameter is set to true, the assistant role message for specifying speech synthesis content can be omitted.
    Currently, only the mimo-v2.5-tts-voicedesign model is supported.
    audio.voicestring
    The voice ID of the built-in voice or the base64 encoding of the audio sample.
    • mimo-v2.5-tts: This field is optional and only supports using built-in voices, with the default value being mimo_default
    • mimo-v2.5-tts-voiceclone: This field is required and only supports passing in the base64 encoding of audio samples, and only supports passing in audio sample files in mp3 and wav formats
    • mimo-v2.5-tts-voicedesign does not support this field
    Available options:
    • mimo-v2.5-tts: mimo_default, 冰糖, 茉莉, 苏打, 白桦, Mia, Chloe, Milo, Dean
  • 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.
    choices.message.audioobject
    If the audio output is requested, this object contains data about the audio response from the model.
    Hide child attributes
    choices.message.audio.idstring
    Unique identifier for this audio response.
    choices.message.audio.datastring
    Base64 encoded audio bytes generated by the model, in the format specified in the request.
    choices.message.audio.expires_atnumber | null
    The Unix timestamp (in seconds) for when this audio response expires. Currently always null.
    choices.message.audio.transcriptstring | null
    Transcript of the audio generated by the model. Currently always null.
    choices.message.final_text_previewstring
    The final audio broadcast text after intelligent optimization and polishing. This field is only returned when the request parameter optimize_text_preview is set to true.
  • 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.

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.delta.audioobject | null
    If the audio output modality is requested, this object contains data about the audio response from the model.
    Hide child attributes
    choices.delta.audio.idstring
    Unique identifier for this audio response.
    choices.delta.audio.datastring
    Base64 encoded audio bytes generated by the model, in the format specified in the request.
    choices.delta.audio.expires_atnumber | null
    The Unix timestamp (in seconds) for when this audio response expires. Currently always null.
    choices.delta.audio.transcriptstring | null
    Transcript of the audio generated by the model. Currently always null.
    choices.delta.final_text_previewstring
    The final audio broadcast text after intelligent optimization and polishing. This field is only returned when the request parameter optimize_text_preview is set to true.
    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.
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"
    }
}'
response
{
    "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
        }
    }
}
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.