Skip to content

Create speech

OpenAI-compatible text-to-speech (MiniMax Speech 2.8 HD / Turbo); the response is the audio bytes directly.

POST/v1/audio/speech

Synthesizes text into audio synchronously; the response is the audio itself, with no task to poll. Works directly with the OpenAI SDK's audio.speech.create; only the Base URL and model / voice change. The two speech models belong to the separate MiniMax Speech Official group; keys from chat or video groups cannot call them.

Any other field returns 400 unknown field, including stream_format, sample_rate, language_boost and voice_setting. For those, streaming output or cloned voices, use the native endpoint POST /v1/t2a_v2; see the Text-to-speech guide. Billed per character: one Han character counts as 2 characters.

Headers

Authorization:requiredstring

Bearer sk-…: an API key created in the console under API keys; its group must include the requested model

Body parametersJSON

model:requiredstring

Case-sensitive, no aliases; tts-1 / tts-1-hd are not recognized

Valuesspeech-2.8-hdspeech-2.8-turbo

input:requiredstring

Text to synthesize (the native endpoint /v1/t2a_v2 allows up to 10000 characters)

Length1–4096 chars

voice:optionalstring

A system voice ID, a cloned voice ID, or an OpenAI voice name: alloy, ash, ballad, cedar, coral, echo, fable, marin, nova, onyx, sage, shimmer, verse (OpenAI voice names map to the default voice). Default: Chinese (Mandarin)_News_Anchor if the text contains Han characters, otherwise English_expressive_narrator

response_format:optionalstring

aac returns 400; opus is 24 kHz in an Ogg container

Valuesmp3opusflacwavpcm

Default"mp3"

speed:optionalnumber

Out-of-range values return 400; in-range values are clamped to 0.5–2

Range0.25–4Default1

instructions:optionalstring

Accepted but ignored

Returns

200Audio bytes. Content-Type follows response_format: audio/mpeg, audio/ogg, audio/flac, audio/wav, audio/pcm

audio/mpeg Audio bytes

Errors

400unknown field, input too long, speed out of range, unsupported response_format
401Missing, invalid or expired API key (missing_api_key / invalid_api_key / api_key_expired)
402Balance, or key / member / department quota, exhausted (insufficient_quota)
404The model is not in this key's group (model_not_found), or the path does not belong to the group (route_not_found)
413Request body over 60 MB (request_too_large)
429Account or key concurrency cap reached (user_concurrency_limit / apikey_concurrency_limit), with Retry-After

Related