Audio
MiniMax Speech 2.8
Synthesize expressive speech with MiniMax Speech 2.8 HD and Turbo across 40 languages, 19 interjection tags, timed pauses, subtitles, and 7 audio formats.
MiniMax Speech 2.8 turns text into expressive audio in two variants—speech-2.8-hd for studio fidelity and speech-2.8-turbo for lower latency and lower character cost. Both share one asynchronous audio endpoint and settle strictly on verified billable characters. See the MiniMax Speech 2.8 model page for current rates and the interactive playground.
Quick example
curl -X POST https://api.reapi.ai/v1/audio/generations \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "speech-2.8-hd",
"text": "Hey, welcome back! (chuckle) Let us walk through the release <#0.5#> step by step.",
"voice_setting": {
"voice_id": "English_Trustworthy_Man",
"speed": 1,
"vol": 1,
"pitch": 0
},
"audio_setting": {
"format": "mp3",
"sample_rate": 32000,
"bitrate": 128000,
"channel": 1
},
"subtitle_enable": true,
"subtitle_type": "sentence"
}'import time
import requests
HEADERS = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
}
submit = requests.post(
"https://api.reapi.ai/v1/audio/generations",
headers=HEADERS,
json={
"model": "speech-2.8-hd",
"text": "Hey, welcome back! (chuckle) Let us walk through the release <#0.5#> step by step.",
"voice_setting": {
"voice_id": "English_Trustworthy_Man",
"speed": 1,
"vol": 1,
"pitch": 0,
},
"audio_setting": {
"format": "mp3",
"sample_rate": 32000,
"bitrate": 128000,
"channel": 1,
},
"subtitle_enable": True,
"subtitle_type": "sentence",
},
timeout=60,
)
submit.raise_for_status()
task_id = submit.json()["id"]
while True:
poll = requests.get(
f"https://api.reapi.ai/v1/tasks/{task_id}?include=billing",
headers=HEADERS,
timeout=30,
)
poll.raise_for_status()
task = poll.json()
if task["status"] in ("completed", "failed"):
print(task)
break
time.sleep(2)const headers = {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
};
const submit = await fetch('https://api.reapi.ai/v1/audio/generations', {
method: 'POST',
headers,
body: JSON.stringify({
model: 'speech-2.8-turbo',
text: 'Your call is connected. <#0.4#> Press one to confirm.',
voice_setting: {
voice_id: 'English_Graceful_Lady',
speed: 1,
vol: 1,
pitch: 0,
},
audio_setting: {
format: 'pcmu_wav',
sample_rate: 8000,
channel: 1,
},
}),
});
if (!submit.ok) throw new Error(`HTTP ${submit.status}`);
const { id: taskId } = await submit.json();
for (;;) {
const res = await fetch(
`https://api.reapi.ai/v1/tasks/${taskId}?include=billing`,
{ headers }
);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const task = await res.json();
if (task.status === 'completed' || task.status === 'failed') {
console.log(task);
break;
}
await new Promise((r) => setTimeout(r, 2000));
}package main
import (
"encoding/json"
"fmt"
"net/http"
"strings"
"time"
)
func main() {
body := strings.NewReader(`{"model":"speech-2.8-hd","text":"Hey, welcome back! (chuckle) Let us walk through the release <#0.5#> step by step.","voice_setting":{"voice_id":"English_Trustworthy_Man","speed":1,"vol":1,"pitch":0},"audio_setting":{"format":"mp3","sample_rate":32000,"bitrate":128000,"channel":1}}`)
req, err := http.NewRequest("POST", "https://api.reapi.ai/v1/audio/generations", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{Timeout: 60 * time.Second}
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
panic(res.Status)
}
var task struct {
ID string `json:"id"`
}
if err := json.NewDecoder(res.Body).Decode(&task); err != nil {
panic(err)
}
fmt.Println(task.ID)
}Endpoint and authentication
- Submit task:
POST https://api.reapi.ai/v1/audio/generations - Poll status:
GET https://api.reapi.ai/v1/tasks/TASK_ID(append?include=billingfor settled billing evidence)
Send Authorization: Bearer YOUR_API_KEY and Content-Type: application/json. Keep your API key on the server. Each POST creates a separate synthesis task; if a network timeout makes a submission ambiguous, inspect your task list before resubmitting.
Available models
| Model ID | Positioning | Typical workloads |
|---|---|---|
speech-2.8-hd | Studio vocal fidelity and rich prosody | Audiobooks, podcasts, game dialogue, premium dubbing |
speech-2.8-turbo | Lower latency and lower per-character cost | Voice agents, telephony IVR, bulk alerts, rapid drafts |
Both models accept the exact same 15 top-level parameters, 40 languages, 19 interjection tags, timed pauses, subtitles, and 7 audio formats.
Top-level parameters
model and text are always required, plus either voice_setting.voice_id or timbre_weights (mutually exclusive).
| Parameter | Type | Default | Constraints & notes |
|---|---|---|---|
model | string | Required | speech-2.8-hd or speech-2.8-turbo. |
text | string | Required | 1–9,999 Unicode characters (< 10,000, non-empty after trimming). Supports 19 inline interjection tags and <#x#> pauses. |
voice_setting | object | Required unless timbre_weights is set | Voice selection, speed, volume, pitch, emotion, text normalization, and LaTeX reading. |
timbre_weights | array | Omitted | 1–4 objects { "voice_id": string, "weight": integer (1–100) }. When provided, voice_setting.voice_id must be empty or omitted. |
audio_setting | object | Omitted | Codec format, sample_rate, bitrate, channel, and force_cbr. |
pronunciation_dict | object | Omitted | { "tone": string[] } with up to 500 "original/replacement" rules (max 500 chars per rule). |
language_boost | string | Omitted | One of 40 supported languages/dialects or "auto". |
text_normalization_mode | string | Omitted | "basic" or "quality". |
voice_modify | object | Omitted | Post-synthesis pitch, intensity, timbre (-100..100) and sound_effects. Requires audio_setting.format in mp3, wav, or flac. |
subtitle_enable | boolean | false | When true, writes a timestamped subtitle JSON file to output.subtitle_url. |
subtitle_type | string | "sentence" | "sentence" or "word" (applies when subtitle_enable is true). |
aigc_watermark | boolean | false | Appends an imperceptible provenance watermark at the end of the clip. |
output_format | string | "url" | Must be "url" when supplied; async tasks return hosted HTTPS URLs. |
stream | boolean | false | Must be false when supplied; asynchronous polling delivery only. |
stream_options | object | Omitted | { "exclude_aggregated_audio"?: boolean } (schema compatibility when stream is false). |
Model-specific extensions are forwarded verbatim to the synthesis engine; acceptance of an extension field does not by itself verify a visible audio change.
Nested objects and validation rules
voice_setting
| Field | Type | Default | Constraints |
|---|---|---|---|
voice_id | string | Required without timbre_weights | Non-empty string up to 256 UTF-8 bytes. Must be omitted or "" when timbre_weights is provided. |
speed | number | 1 | 0.5 to 2.0 inclusive. |
vol | number | 1 | Strictly > 0 up to 10.0. |
pitch | integer | 0 | -12 to 12 semitones inclusive. |
emotion | string | Automatic | Omit for context-inferred prosody, or pass happy, sad, angry, fearful, disgusted, surprised, or calm. Legacy whisper and fluent values are rejected. |
text_normalization | boolean | false | Expands numbers, dates, currencies, and symbols before synthesis. |
latex_read | boolean | false | Speaks inline $$...$$ LaTeX equations aloud. |
audio_setting
| Field | Type | Default | Constraints |
|---|---|---|---|
format | string | "mp3" | mp3, pcm, flac, wav, pcmu_raw, pcmu_wav, or opus. |
sample_rate | integer | 32000 | 8000, 16000, 22050, 24000, 32000, or 44100. Must be 8000 when format is pcmu_raw or pcmu_wav. |
bitrate | integer | 128000 | 32000, 64000, 128000, or 256000. Allowed only when format is mp3. |
channel | integer | 1 | 1 (mono) or 2 (stereo). |
force_cbr | boolean | false | Constant-bitrate encoding for MP3. |
voice_modify
Requires audio_setting.format to be mp3, wav, or flac (default mp3 qualifies). Rejected on pcm, opus, pcmu_raw, and pcmu_wav.
| Field | Type | Range / Enum |
|---|---|---|
pitch | integer | -100 to 100 |
intensity | integer | -100 to 100 |
timbre | integer | -100 to 100 |
sound_effects | string | spacious_echo, auditorium_echo, lofi_telephone, or robotic |
pronunciation_dict
Pass { "tone": ["API/A P I", "重/(chong2)", "重新/(chong2)(xin1)"] }. Up to 500 entries, max 500 characters per rule, and every entry must contain a non-empty original/replacement pair separated by /.
Inline interjection tags and timed pauses
19 supported interjection tags
Insert any of the 19 nonverbal tags directly inside text:
(laughs), (chuckle), (coughs), (clear-throat), (groans), (breath), (pant), (inhale), (exhale), (gasps), (sniffs), (sighs), (snorts), (burps), (lip-smacking), (humming), (hissing), (emm), (sneezes).
Timed pause syntax (<#x#>)
xmust be between0.01and99.99seconds with at most two decimal places (e.g.<#0.5#>,<#1.25#>).- Every pause marker must sit between non-whitespace speakable segments (no leading or trailing pause markers).
- Consecutive pause markers without speakable text between them (e.g.
<#0.5#> <#0.5#>) are rejected.
Preset voices and supported languages
16 verified system voice presets
English_Trustworthy_Man, English_Graceful_Lady, English_Gentle-voiced_man, English_Aussie_Bloke, English_Diligent_Man, English_Whispering_girl, Chinese (Mandarin)_Reliable_Executive, Chinese (Mandarin)_News_Anchor, male-qn-qingse, female-tianmei, Cantonese_GentleLady, Japanese_IntellectualSenior, Korean_SweetGirl, Spanish_CaptivatingStoryteller, French_MaleNarrator, German_FriendlyMan. Any valid MiniMax system voice_id up to 256 UTF-8 bytes is also accepted.
40 supported language_boost values (plus auto)
Chinese, Chinese,Yue, English, Arabic, Russian, Spanish, French, Portuguese, German, Turkish, Dutch, Ukrainian, Vietnamese, Indonesian, Japanese, Italian, Korean, Thai, Polish, Romanian, Greek, Czech, Finnish, Hindi, Bulgarian, Danish, Hebrew, Malay, Persian, Slovak, Swedish, Croatian, Filipino, Hungarian, Norwegian, Slovenian, Catalan, Nynorsk, Tamil, Afrikaans, auto.
Task response, subtitles, and metadata
A successful POST /api/v1/audio/generations returns:
{
"id": "task_example",
"status": "processing",
"model": "speech-2.8-hd"
}Polling GET /api/v1/tasks/task_example until status is "completed" returns:
{
"id": "task_example",
"status": "completed",
"model": "speech-2.8-hd",
"output": {
"audio_urls": [
"https://cdn.reapi.ai/media/tasks/task_example/0.mp3"
],
"subtitle_url": "https://cdn.reapi.ai/media/tasks/task_example/subtitles.json",
"extra_info": {
"audio_length": 4820,
"audio_sample_rate": 32000,
"audio_size": 77580,
"bitrate": 128000,
"audio_format": "mp3",
"audio_channel": 1,
"word_count": 13,
"invisible_character_ratio": 0,
"usage_characters": 81
}
}
}When subtitle_enable is true, output.subtitle_url serves a JSON array of millisecond-aligned cues:
[
{
"text": "Hey, welcome back!",
"time_begin": 0,
"time_end": 1420
}
]Billing and pricing dimensions
- Both
speech-2.8-hdandspeech-2.8-turbobill strictly per billable character: each Chinese (Han) ideograph (\p{Script=Han}) counts as 2 characters, and every other Unicode code point (Latin letters, digits, spaces, punctuation, interjection tags, and<#x#>pauses) counts as 1 character (minimum 1 per request). - Submission reserves an estimate from input text length; completion settles to the exact
output.extra_info.usage_charactersat the rate frozen when the task was submitted. - Audio format, sample rate, subtitles,
timbre_weights, andvoice_modifyadd no separate surcharge. - Failed tasks release the full reservation automatically. Pass
?include=billingonGET /api/v1/tasks/TASK_IDto inspect the reconciled billing record. - See current per-million-character rates on the MiniMax Speech 2.8 pricing table.
Errors and scope boundaries
- Synchronous HTTP 4xx on submit:
POST /api/v1/audio/generationsreturns synchronous HTTP 4xx errors for authentication failures, insufficient balance, malformed JSON bodies, or unknownmodelIDs. - Asynchronous parameter validation (
status: "failed"+ full refund): Request bodies use upstream parameter passthrough so newly added vendor options are never blocked locally. Invalidtext(empty or ≥ 10,000 runes), malformed/edge/consecutive pause markers, missing or conflictingvoice_id/timbre_weights,bitrateon a non-MP3 format,pcmu_raw/pcmu_wavwith a sample rate other than8000,voice_modifyonpcm/opus/pcmu_*, orstream: truetherefore enqueue a task and surface asstatus: "failed"when pollingGET /api/v1/tasks/TASK_ID, with reserved credits refunded automatically in full. (The interactive Playground validates these rules before submission.) - Voice Cloning & Voice Design boundary: This endpoint covers MiniMax Speech 2.8 HD and Turbo text-to-speech synthesis only. Separate Voice Cloning and Voice Design creation workflows are not exposed on
/api/v1/audio/generations.