Skip to main content
POST
合成语音

授权

Authorization
string
header
必填

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

请求体

application/json
model
enum<string>
必填

使用的语音模型。hd 系列音质优先,turbo 系列时延优先。

可用选项:
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
示例:

"speech-2.8-hd"

input
string
必填

要合成的文本,按字符数计费。

示例:

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

voice
string
必填

MiniMax 音色 ID,如 male-qn-qingsefemale-shaonv,会作为 voice_id 透传给上游。

示例:

"male-qn-qingse"

response_format
enum<string>
默认值:mp3

返回音频的容器格式。

可用选项:
mp3,
wav,
flac,
aac,
pcm
speed
number
默认值:1

语速倍率。

必填范围: 0.5 <= x <= 2
metadata
object

透传给上游 MiniMax 的厂商专属字段,例如 {"voice_setting": {"emotion": "happy"}, "audio_setting": {"sample_rate": 32000}, "language_boost": "Chinese"}。设为 {"output_format": "url"} 时改为 302 跳转到音频 URL 而不是直接返回字节。

响应

合成成功,响应体即音频文件。

The response is of type file.