Skip to main content
POST
Create speech

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

The speech model to use. hd variants prioritize fidelity, turbo variants prioritize latency.

Available options:
speech-2.8-hd,
speech-2.8-turbo,
speech-2.6-hd,
speech-2.6-turbo,
speech-02-hd,
speech-02-turbo,
speech-01-hd,
speech-01-turbo
Example:

"speech-2.8-hd"

input
string
required

The text to synthesize. Billed per character.

Example:

"你好,欢迎使用语音合成服务。"

voice
string
required

MiniMax voice ID, e.g. male-qn-qingse, female-shaonv. Passed through to the provider as voice_id.

Example:

"male-qn-qingse"

response_format
enum<string>
default:mp3

Audio container format of the response.

Available options:
mp3,
wav,
flac,
aac,
pcm
speed
number
default:1

Playback speed multiplier.

Required range: 0.5 <= x <= 2
metadata
object

Provider-specific fields merged into the upstream MiniMax request, e.g. {"voice_setting": {"emotion": "happy"}, "audio_setting": {"sample_rate": 32000}, "language_boost": "Chinese"}. Set {"output_format": "url"} to receive a 302 redirect to the audio URL instead of raw bytes.

Response

Audio synthesized successfully; the response body is the audio file.

The response is of type file.