PopNowAPI 文档
正文

MiniMax Speech 2.8 Turbo API 调用参考

快速语音合成,400 多种音色,可控情绪

用一个 PopNow API 密钥,就能在自己的代码里调用 MiniMax Speech 2.8 Turbo。下面列出要填的调用名、这个型号接受的每个输入字段、每次请求花多少积分,以及一段可以直接粘进终端运行的请求。

参数说明直接取自型号的输入 schema,暂时只有英文。

一览

出品方
MiniMax
产出
音频
起价
10.8 积分 每 1000 字符 ($0.108)
一般耗时
约 7 秒

1 积分 = 0.01 美元。任务受理时先冻结可能的最高费用,完成后按实际用量结算、向上取整到整积分,多冻的退回;失败的任务不扣积分。想在运行前知道确切数字,先调 POST /api/v1/jobs/quote。

文字转语音

minimax/speech-2.8-turbo/text-to-speech

价格

选项积分 (每 1000 字符)美元
默认10.8$0.108

参数

字段类型默认值取值范围作用
text必填string—最多 5000 个字符The words to be spoken, exactly as written. Sound tags such as (sighs) or (laughs) are performed. Billed per 1,000 characters.
voice_id可选stringCalm_WomanWise_Woman, Friendly_Person, Inspirational_girl, Deep_Voice_Man, Calm_Woman, Casual_Guy, Lively_Girl, Patient_Man, Young_Knight, Determined_Man, Lovely_Girl, Decent_Boy, Imposing_Manner, Elegant_Man, … (+458)System voice. The label shows the voice name and, where known, the language it is built for.
emotion可选stringneutralneutral, happy, sad, angry, fearful, disgusted, surprisedEmotion of the reading.
speed可选number10.5 到 2Speaking rate; 1 is the voice's normal pace.
pitch可选integer0-12 到 12Pitch shift in semitones; 0 keeps the voice's own pitch.
volume可选number10.1 到 10Loudness multiplier; 1 is the normal level.
language可选stringautoauto, zh, yue, en, ar, ru, es, fr, pt, de, tr, nl, uk, vi, … (+27)Language hint that improves pronunciation; auto detects it from the text.
output_format可选stringmp3mp3, wav, flac, pcmFile format of the result; pcm is headerless 16-bit little-endian samples.
sample_rate可选integer—8000, 16000, 22050, 24000, 32000, 44100Sample rate in Hz. The model uses 32000 when omitted.
bitrate可选integer—32000, 64000, 128000, 256000MP3 bitrate in bits per second; ignored for other formats. The model uses 128000 when omitted.
audio_channels可选string—mono, stereoMono or stereo output. Mono when omitted.
english_normalization可选booleanfalse—Read numbers, dates and abbreviations in English text the way a person would say them.
pronunciation_dict可选array<object>—最多 100 项Custom pronunciations: each alias in the text is read as its pronunciation.

请求示例

这段请求原样就能运行,没写的字段都用默认值。运行前先把密钥放进环境变量 POPNOW_API_KEY。

POST /api/v1/jobs/createTask?wait=60
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask?wait=60" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "minimax/speech-2.8-turbo/text-to-speech",
  "input": {
    "text": "Hi there! This voice was created with the PopNow API in just a few seconds."
  }
}'

响应里会立刻带回 taskId。之后用 GET /api/v1/jobs/recordInfo 取结果,或者在请求里加上 callBackUrl 等通知。

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

接下来

本页内容