Create T2A v2 audio
MiniMax T2A v2 native request body: full parameters, cloned voices and SSE streaming; audio in JSON responses is hex.
/v1/t2a_v2Takes the MiniMax T2A v2 request body as is, so official SDK code works after changing the Base URL and key; fields the gateway does not know pass through unchanged, and JSON responses keep the official structure too (except errors). The two speech models belong to their own group, MiniMax Speech Official; keys for chat or video groups cannot reach them.
The gateway does only three things here: validates model, the text length, stream and output_format; clamps voice_setting.speed to the official range; and limits the request body to ≤1 MiB. Other fields with values outside the official range return 400 from the service.
data.audio is hex-encoded audio, and extra_info.usage_characters is the billed character count. Pass stream: true to switch to SSE: each data: {...} event carries a chunk of hex audio, and the final chunk has data.status 2 plus extra_info. If a stream fails midway, a last event with base_resp is pushed before the stream closes, and nothing is billed. See Streaming.
For a cloned voice, set voice_setting.voice_id (or timber_weights[].voice_id). The clone fee is charged once, with the voice's first successful synthesis, and the usage record details show an extra voice_clone_activation item. If you only need the OpenAI shape, use POST /v1/audio/speech.
Headers
Bearer sk-…: an API key created in the console under API keys; its group must include the requested model
Body parametersJSON
Case-sensitive, no aliases
Valuesspeech-2.8-hdspeech-2.8-turbo
Text to synthesize; separate paragraphs with line breaks. Supports pause markers <#x#> (0.01–99.99 seconds), inline pronunciation and interjections; see the speech guide. Officially, streaming is recommended beyond 3000 characters
Length1–10000 chars
When true, the response switches to SSE
Defaultfalse
Streaming options
When true, the final chunk no longer carries the full audio. Recommended true for streaming; otherwise the final chunk resends the whole clip, and appending it directly gives you the audio twice
Defaultfalse
Improves recognition of that language or dialect; auto lets the model decide. Cantonese voices need Chinese,Yue. Not set when omitted
ValuesautoChineseChinese,YueEnglishArabicRussianSpanishFrenchPortugueseGermanTurkishDutchUkrainianVietnameseIndonesianJapaneseItalianKoreanThaiPolishRomanianGreekCzechFinnishHindiBulgarianDanishHebrewMalayPersianSlovakSwedishCroatianFilipinoHungarianNorwegianSlovenianCatalanNynorskTamilAfrikaans
Pronunciation dictionary
source/replacement rules; multiple rules apply together. The replacement can be plain text (omg/oh my god), Japanese kana (a kanji word mapped to its kana reading), pinyin with tones 1–5 in parentheses (a Chinese word mapped to (chu3)(li3)) or IPA (resume/(rɪˈzjuːm))
Voice modification, passed through with the official semantics; not validated by the gateway
Deeper → brighter
Range-100–100
Stronger → softer
Range-100–100
Fuller → crisper
Range-100–100
Sound effect, one at a time. With a sound effect, non-streaming supports mp3 / wav / flac, and streaming supports only mp3
Valuesspacious_echoauditorium_echolofi_telephonerobotic
Only hex is supported; url returns 400
Valueshex
Default"hex"
Voice settings
System or cloned voice ID; pass case, spaces and parentheses exactly. See System voices
Speed; official range 0.5–2. Values outside the range are clamped into it by the gateway
Default1
Volume; greater than 0, up to 10
Range≤ 10Default1
Pitch; 0 is the original pitch
Range-12–12Default0
Inferred from the text when omitted; set it only to fix an emotion. Officially, fluent and whisper are documented only for the 2.6 series; whisper is explicitly not supported on Speech 2.8
Valueshappysadangryfearfuldisgustedsurprisedcalmfluentwhisper
Normalizes how Chinese and English numbers are read; adds slight latency
Defaultfalse
Chinese only; wrap formulas in $$. When on, language_boost is forced to Chinese
Defaultfalse
Audio settings
opus is in an Ogg/Opus container
Valuesmp3pcmflacwavopus
Default"mp3"
Sample rate; must be set explicitly for opus. No official default is documented; the official example uses 32000
Values80001600022050240003200044100
Bitrate; mp3 only. No official default is documented; the official example uses 128000
Values3200064000128000256000
1 mono, 2 stereo
Values12
Default1
Constant bitrate; streaming mp3 only
Defaultfalse
Returns
200JSON when non-streaming; text/event-stream with stream: true, where each event's data has the same shape as below
Hex-encoded audio; when streaming, this chunk's audio segment
2 on the final streaming chunk
Audio metadata and billed character count
Billed character count (authoritative): every Unicode character counts 1 and each Han character counts 1 more; punctuation, spaces, emoji and pause markers count 1 each
Audio duration, milliseconds
Sample rate
Audio size in bytes
Bitrate
Word count
Audio format, such as mp3
Number of channels
{"status_code": 0, "status_msg": "success"} on success; errors do not come here but as a non-200 status code with an error object
0 on success
success on success
Errors
model, empty text or over 10000 characters, output_format other than hex, nonexistent voice ID, opus without sample_rate, values outside the official range, sensitive content, etc.missing_api_key / invalid_api_key / api_key_expired)insufficient_quota)model_not_found), or the path does not belong to the group (route_not_found)request body exceeds the 1048576 byte limit (got N bytes)user_concurrency_limit / apikey_concurrency_limit), with Retry-Afterresponse_size_limit_exceeded): use stream: true, shorten the text or lower the bitrate