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
- messagesarrayRequiredThe current conversation message list.Hide child attributesMessages sent by an end user, containing prompts or additional context information.
Note: When generating audio using the
mimo-v2.5-tts-voicedesignmodel, this message is required and is used to specify the text describing the voice design.Hide child attributesmessages.contentstringRequiredThe contents of the user message.messages.rolestringRequiredRole of the message author.
Available options:user - modelstringRequiredModel ID is used to generate the response.
Available options:mimo-v2.5-tts,mimo-v2.5-tts-voicedesign,mimo-v2.5-tts-voiceclone - audioobjectParameters 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 themimo-v2.5-tts-voicedesignmodel, a message with the role ofuseris required. Ifoptimize_text_previewis set totrue, theassistantmessage can be omitted.Hide child attributesaudio.formatstringDefault: wavSpecifies the output audio format. Default:wav, orpcmwhen you setstream: true.Passing in
Available options:pcmorpcm16both indicate specifying the use of thepcm16format.wav,mp3,pcm,pcm16audio.optimize_text_previewbooleanDefault: falseEnables intelligent optimization of the target audio broadcast text.
When set totrue, 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, theassistantrole message for specifying speech synthesis content can be omitted.Currently, only the
mimo-v2.5-tts-voicedesignmodel is supported.audio.voicestringThe 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 beingmimo_defaultmimo-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 inmp3andwavformatsmimo-v2.5-tts-voicedesigndoes not support this field
mimo-v2.5-tts:mimo_default,冰糖,茉莉,苏打,白桦,Mia,Chloe,Milo,Dean
- streambooleanDefault: falseIf 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)
- choicesarrayA list of chat completion choices.Hide child attributeschoices.finish_reasonstringThe reason the model stopped generating tokens:
stop: The model reached a natural stop point or a user‑provided stop sequencelength: Terminated due to exceeding the model's maximum generation lengthcontent_filter: Content was omitted due to a content filter flag
choices.indexintegerThe index of the choice in the list of choices.choices.messageobjectA chat completion message generated by the model.Hide child attributeschoices.message.contentstringThe contents of the message.choices.message.rolestringThe role of the author of this message.choices.message.audioobjectIf the audio output is requested, this object contains data about the audio response from the model.Hide child attributeschoices.message.audio.idstringUnique identifier for this audio response.choices.message.audio.datastringBase64 encoded audio bytes generated by the model, in the format specified in the request.choices.message.audio.expires_atnumber | nullThe Unix timestamp (in seconds) for when this audio response expires. Currently alwaysnull.choices.message.audio.transcriptstring | nullTranscript of the audio generated by the model. Currently alwaysnull.choices.message.final_text_previewstringThe final audio broadcast text after intelligent optimization and polishing. This field is only returned when the request parameteroptimize_text_previewis set totrue. - createdintegerThe Unix timestamp (in seconds) of when the chat completion was created.
- idstringA unique identifier for the chat completion.
- modelstringThe model to generate the completion.
- objectstringThe object type, which is always
chat.completion. - usageobject | nullUsage statistics for the completion request.Hide child attributesusage.completion_tokensintegerNumber of tokens in the generated completion.usage.prompt_tokensintegerNumber of tokens in the prompt.usage.total_tokensintegerTotal number of tokens used in the request (prompt + completion).usage.completion_tokens_detailsobjectBreakdown of tokens used in a completion.Hide child attributesusage.completion_tokens_details.reasoning_tokensintegerTokens generated by the model for reasoning. Always
0.usage.prompt_tokens_detailsobjectBreakdown of tokens used in the prompt.Hide child attributesusage.prompt_tokens_details.cached_tokensintegerNumber of tokens served from cache.
Chat response chunk object (streaming output)
- choicesarrayA list of chat completion choices.Hide child attributeschoices.deltaobjectA chat completion delta generated by streamed model responses.Hide child attributeschoices.delta.contentstringThe contents of the chunk message.choices.delta.rolestringThe role of the author of this message.choices.delta.audioobject | nullIf the audio output modality is requested, this object contains data about the audio response from the model.Hide child attributeschoices.delta.audio.idstringUnique identifier for this audio response.choices.delta.audio.datastringBase64 encoded audio bytes generated by the model, in the format specified in the request.choices.delta.audio.expires_atnumber | nullThe Unix timestamp (in seconds) for when this audio response expires. Currently always
null.choices.delta.audio.transcriptstring | nullTranscript of the audio generated by the model. Currently alwaysnull.choices.delta.final_text_previewstringThe final audio broadcast text after intelligent optimization and polishing. This field is only returned when the request parameteroptimize_text_previewis set totrue.choices.finish_reasonstring | nullThe reason the model stopped generating tokens:stop: The model reached a natural stop point or a user‑provided stop sequencelength: Terminated due to exceeding the model's maximum generation lengthcontent_filter: Content was omitted due to a content filter flag
choices.indexintegerThe index of the choice in the list of choices. - createdintegerThe Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
- idstringA unique identifier for the chat completion. Each chunk has the same ID.
- modelstringThe model to generate the completion.
- objectstringThe object type, which is always
chat.completion.chunk. - usageobject | nullUsage statistics for the completion request.Hide child attributesusage.completion_tokensintegerNumber of tokens in the generated completion.usage.prompt_tokensintegerNumber of tokens in the prompt.usage.total_tokensintegerTotal number of tokens used in the request (prompt + completion).usage.completion_tokens_detailsobjectBreakdown of tokens used in a completion.Hide child attributesusage.completion_tokens_details.reasoning_tokensintegerTokens generated by the model for reasoning. Always
0.usage.prompt_tokens_detailsobjectBreakdown of tokens used in the prompt.Hide child attributesusage.prompt_tokens_details.cached_tokensintegerNumber 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