MiniMax Speech 2.8
MiniMax Speech 2.8 is available through the OpenAI-compatible text-to-speech endpoint. The current integration supports synchronous speech generation for short narration, dubbing, and voice output.
Endpoint
POST /v1/audio/speechSupported Models
| Model | Description |
|---|---|
minimax-speech-2.8-turbo | Low-latency speech synthesis model |
minimax-speech-2.8-hd | Higher-quality speech synthesis model |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | minimax-speech-2.8-turbo or minimax-speech-2.8-hd |
input | string | Yes | Text to synthesize |
voice | string | Yes | MiniMax voice ID, such as a system voice, cloned voice, or generated voice ID |
response_format | string | No | Audio format. Default is mp3; common values include mp3, wav, flac, and pcm |
speed | number | No | Speech speed, commonly 0.5 to 2; default is 1 |
metadata | object | No | MiniMax extension options |
Basic Example
curl -X POST "https://cubicspaces.cloud/v1/audio/speech" \
-H "Authorization: Bearer $NEW_API_KEY" \
-H "Content-Type: application/json" \
--output minimax-speech.mp3 \
-d '{
"model": "minimax-speech-2.8-turbo",
"voice": "male-qn-qingse",
"input": "Hello, this is a MiniMax Speech 2.8 synchronous speech generation test.",
"response_format": "mp3",
"speed": 1
}'On success, the response body is binary audio. Use --output or an equivalent client option to save the file.
Create And Use A Cloned Voice
MiniMax Speech can synthesize audio with a cloned voice. First create the cloned voice through the voice cloning endpoint and obtain voice_id. Then pass that voice_id as the voice value when calling /v1/audio/speech.
Typical workflow:
- Prepare source audio for cloning. A clear single-speaker mp3, m4a, or wav file with low background noise is recommended.
- Call
/v1/audio/voice-cloningwith the source audio URL, and optionally provide preview text and a preview model. - Read
voice_idfrom the response. - Use that
voice_idwith/v1/audio/speech.
Cloning audio and retention notes:
| Item | Description |
|---|---|
| Source audio | Use a publicly accessible audio URL. Supported formats include mp3, m4a, and wav |
| Duration | At least 10 seconds and no more than 5 minutes |
| File size | No more than 20 MB |
| Prompt audio | Optional. If clone_prompt is provided, the prompt audio should be shorter than 8 seconds, with matching text ending in punctuation |
| Result | The cloning workflow returns voice_id. If preview text and a preview model are provided, it usually also returns a preview audio URL |
| Voice retention | Fast-cloned voices may be temporary. After creating one, call that voice_id through /v1/audio/speech as soon as possible |
Create a cloned voice:
curl -X POST "https://cubicspaces.cloud/v1/audio/voice-cloning" \
-H "Authorization: Bearer $NEW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-voice-cloning",
"audio_url": "https://example.com/voice.mp3",
"text": "This text is used to preview the cloned voice.",
"preview_model": "speech-2.8-hd",
"accuracy": 0.7,
"need_noise_reduction": true,
"need_volume_normalization": true
}'Response example:
{
"demo_audio_url": "https://example.com/demo.mp3",
"voice_id": "voice_abc123"
}To improve voice similarity and stability, add clone_prompt:
{
"model": "minimax-voice-cloning",
"audio_url": "https://example.com/voice.mp3",
"clone_prompt": {
"prompt_audio_url": "https://example.com/prompt.mp3",
"prompt_text": "This is the text that matches the prompt audio."
},
"text": "This text is used to preview the cloned voice.",
"preview_model": "speech-2.8-hd"
}Cloned voice synthesis example:
curl -X POST "https://cubicspaces.cloud/v1/audio/speech" \
-H "Authorization: Bearer $NEW_API_KEY" \
-H "Content-Type: application/json" \
--output cloned-voice.mp3 \
-d '{
"model": "minimax-speech-2.8-hd",
"voice": "voice_abc123",
"input": "This is an example generated with a cloned voice.",
"response_format": "mp3",
"speed": 1
}'To adjust volume, speed, pitch, or emotion for the cloned voice, pass MiniMax-native options through metadata.voice_setting:
{
"model": "minimax-speech-2.8-hd",
"voice": "voice_abc123",
"input": "This is a cloned voice example with emotion and volume settings.",
"response_format": "mp3",
"metadata": {
"voice_setting": {
"voice_id": "voice_abc123",
"speed": 1,
"vol": 1,
"pitch": 0,
"emotion": "happy"
},
"audio_setting": {
"format": "mp3",
"sample_rate": 32000,
"bitrate": 128000,
"channel": 1
},
"language_boost": "English"
}
}Keep voice and metadata.voice_setting.voice_id consistent. In /v1/audio/voice-cloning, model selects the cloning capability; minimax-voice-cloning is recommended. If you pass text to generate preview audio, set preview_model, such as speech-2.8-hd or speech-2.8-turbo.
Native Options Example
To set sample rate, volume, emotion, language boost, pronunciation dictionaries, or other MiniMax-native options, send them in metadata:
{
"model": "minimax-speech-2.8-hd",
"voice": "male-qn-qingse",
"input": "Welcome to Cubicspaces MiniMax speech synthesis.",
"response_format": "mp3",
"metadata": {
"audio_setting": {
"format": "mp3",
"sample_rate": 32000,
"bitrate": 128000,
"channel": 1
},
"voice_setting": {
"voice_id": "male-qn-qingse",
"speed": 1,
"vol": 1,
"pitch": 0,
"emotion": "happy"
},
"language_boost": "English",
"subtitle_enable": false
}
}Common native fields:
| Field | Description |
|---|---|
audio_setting.format | Audio format, such as mp3, pcm, flac, or wav |
audio_setting.sample_rate | Sample rate, such as 8000, 16000, 22050, 24000, 32000, or 44100 |
audio_setting.bitrate | MP3 bitrate, such as 32000, 64000, 128000, or 256000 |
voice_setting.voice_id | Voice ID. For mixed voices, use it with timbre_weights |
voice_setting.speed | Speech speed, commonly 0.5 to 2 |
voice_setting.vol | Volume, commonly (0, 10] |
voice_setting.pitch | Pitch, commonly -12 to 12 |
voice_setting.emotion | Emotion, such as happy, sad, angry, fearful, disgusted, surprised, calm, fluent, or whisper |
voice_modify | Voice pitch, timbre, intensity, and sound effect controls |
pronunciation_dict | Pronunciation dictionary |
subtitle_enable | Whether to request subtitle output. Actual behavior depends on model support |
Notes
- This page covers synchronous speech generation. The response body is the generated audio content.
metadataoverrides extension fields with the same name. Do not changemodelinsidemetadata, to keep request behavior predictable.