POST https://api.tokenhot.ai/v1/chat/completionsmimo-v2.5-tts-voicecloneaudio.voice field in the format data:{MIME_TYPE};base64,{BASE64_AUDIO}.role: assistant message; the role: user message is an optional style/tone instruction.| Format | MIME_TYPE |
|---|---|
| MP3 | audio/mpeg or audio/mp3 |
| WAV | audio/wav |
curl --location 'https://api.tokenhot.ai/v1/chat/completions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "mimo-v2.5-tts-voiceclone",
"messages": [
{
"role": "user",
"content": ""
},
{
"role": "assistant",
"content": "Yes, I had a sandwich."
}
],
"audio": {
"format": "wav",
"voice": "data:audio/mpeg;base64,SUQz...(Base64-encoded audio sample)"
}
}'{
"id": "chatcmpl-abc123def456",
"object": "chat.completion",
"created": 1774324467,
"model": "mimo-v2.5-tts-voiceclone",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"audio": {
"id": "3864a4690d8a4aaea5f6acf4853a0600",
"data": "UklGR...(Base64-encoded audio data)",
"expires_at": null,
"transcript": null
}
},
"finish_reason": "stop"
}
]
}