跳转到主要内容
POST
/
v3
/
async
/
minimax-speech-2.8-turbo
MiniMax Speech 2.8 Turbo 异步语音合成
curl --request POST \
  --url https://api.ppio.com/v3/async/minimax-speech-2.8-turbo \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "text": "<string>",
  "text_file_id": 123,
  "voice_modify": {
    "pitch": 123,
    "timbre": 123,
    "intensity": 123,
    "sound_effects": "<string>"
  },
  "audio_setting": {
    "format": "<string>",
    "bitrate": 123,
    "channel": 123,
    "audio_sample_rate": 123
  },
  "voice_setting": {
    "vol": 123,
    "pitch": 123,
    "speed": 123,
    "emotion": "<string>",
    "voice_id": "<string>",
    "english_normalization": true
  },
  "aigc_watermark": true,
  "language_boost": "<string>",
  "pronunciation_dict": {
    "tone": [
      "<string>"
    ]
  }
}
'
import requests

url = "https://api.ppio.com/v3/async/minimax-speech-2.8-turbo"

payload = {
"text": "<string>",
"text_file_id": 123,
"voice_modify": {
"pitch": 123,
"timbre": 123,
"intensity": 123,
"sound_effects": "<string>"
},
"audio_setting": {
"format": "<string>",
"bitrate": 123,
"channel": 123,
"audio_sample_rate": 123
},
"voice_setting": {
"vol": 123,
"pitch": 123,
"speed": 123,
"emotion": "<string>",
"voice_id": "<string>",
"english_normalization": True
},
"aigc_watermark": True,
"language_boost": "<string>",
"pronunciation_dict": { "tone": ["<string>"] }
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
text: '<string>',
text_file_id: 123,
voice_modify: {pitch: 123, timbre: 123, intensity: 123, sound_effects: '<string>'},
audio_setting: {format: '<string>', bitrate: 123, channel: 123, audio_sample_rate: 123},
voice_setting: {
vol: 123,
pitch: 123,
speed: 123,
emotion: '<string>',
voice_id: '<string>',
english_normalization: true
},
aigc_watermark: true,
language_boost: '<string>',
pronunciation_dict: {tone: ['<string>']}
})
};

fetch('https://api.ppio.com/v3/async/minimax-speech-2.8-turbo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ppio.com/v3/async/minimax-speech-2.8-turbo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '<string>',
'text_file_id' => 123,
'voice_modify' => [
'pitch' => 123,
'timbre' => 123,
'intensity' => 123,
'sound_effects' => '<string>'
],
'audio_setting' => [
'format' => '<string>',
'bitrate' => 123,
'channel' => 123,
'audio_sample_rate' => 123
],
'voice_setting' => [
'vol' => 123,
'pitch' => 123,
'speed' => 123,
'emotion' => '<string>',
'voice_id' => '<string>',
'english_normalization' => true
],
'aigc_watermark' => true,
'language_boost' => '<string>',
'pronunciation_dict' => [
'tone' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.ppio.com/v3/async/minimax-speech-2.8-turbo"

payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"text_file_id\": 123,\n \"voice_modify\": {\n \"pitch\": 123,\n \"timbre\": 123,\n \"intensity\": 123,\n \"sound_effects\": \"<string>\"\n },\n \"audio_setting\": {\n \"format\": \"<string>\",\n \"bitrate\": 123,\n \"channel\": 123,\n \"audio_sample_rate\": 123\n },\n \"voice_setting\": {\n \"vol\": 123,\n \"pitch\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"english_normalization\": true\n },\n \"aigc_watermark\": true,\n \"language_boost\": \"<string>\",\n \"pronunciation_dict\": {\n \"tone\": [\n \"<string>\"\n ]\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.ppio.com/v3/async/minimax-speech-2.8-turbo")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"text\": \"<string>\",\n \"text_file_id\": 123,\n \"voice_modify\": {\n \"pitch\": 123,\n \"timbre\": 123,\n \"intensity\": 123,\n \"sound_effects\": \"<string>\"\n },\n \"audio_setting\": {\n \"format\": \"<string>\",\n \"bitrate\": 123,\n \"channel\": 123,\n \"audio_sample_rate\": 123\n },\n \"voice_setting\": {\n \"vol\": 123,\n \"pitch\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"english_normalization\": true\n },\n \"aigc_watermark\": true,\n \"language_boost\": \"<string>\",\n \"pronunciation_dict\": {\n \"tone\": [\n \"<string>\"\n ]\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.ppio.com/v3/async/minimax-speech-2.8-turbo")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"text\": \"<string>\",\n \"text_file_id\": 123,\n \"voice_modify\": {\n \"pitch\": 123,\n \"timbre\": 123,\n \"intensity\": 123,\n \"sound_effects\": \"<string>\"\n },\n \"audio_setting\": {\n \"format\": \"<string>\",\n \"bitrate\": 123,\n \"channel\": 123,\n \"audio_sample_rate\": 123\n },\n \"voice_setting\": {\n \"vol\": 123,\n \"pitch\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"voice_id\": \"<string>\",\n \"english_normalization\": true\n },\n \"aigc_watermark\": true,\n \"language_boost\": \"<string>\",\n \"pronunciation_dict\": {\n \"tone\": [\n \"<string>\"\n ]\n }\n}"

response = http.request(request)
puts response.read_body
{
  "file_id": 123,
  "task_id": "<string>",
  "base_resp": {
    "status_msg": "<string>",
    "status_code": 123
  },
  "task_token": "<string>",
  "usage_characters": 123
}
MiniMax 异步语音合成 API,支持多种音色、情绪、语速等参数设置,文本长度限制最长 5 万字符,支持文件输入(最长 10 万字符)
这是一个异步API,只会返回异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 来检索视频生成结果。

请求头

Content-Type
string
必填
枚举值: application/json
Authorization
string
必填
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。

请求体

text
string
待合成音频的文本,限制最长 5 万字符。和 text_file_id 二选一必填

• 语气词标签:仅当模型选择 speech-2.8-hdspeech-2.8-turbo 时,支持在文本中插入语气词标签。支持的语气词:(laughs)(笑声)、(chuckle)(轻笑)、(coughs)(咳嗽)、(clear-throat)(清嗓子)、(groans)(呻吟)、(breath)(正常换气)、(pant)(喘气)、(inhale)(吸气)、(exhale)(呼气)、(gasps)(倒吸气)、(sniffs)(吸鼻子)、(sighs)(叹气)、(snorts)(喷鼻息)、(burps)(打嗝)、(lip-smacking)(咂嘴)、(humming)(哼唱)、(hissing)(嘶嘶声)、(emm)(嗯)、(whistles)(口哨)、(sneezes)(喷嚏)、(crying)(抽泣)、(applause)(鼓掌)
text_file_id
integer
待合成音频的文本文件 id,单个文件长度限制小于 10 万字符,支持的文件格式:txt、zip。和 text 二选一必填,传入后自动校验格式。
txt 文件:长度限制 <100,000 字符。支持使用 &lt;#x#&gt; 标记自定义停顿。x 为停顿时长(单位:秒),范围 [0.01,99.99],最多保留两位小数。注意停顿需设置在两个可以语音发音的文本之间,不可连续使用多个停顿标记
zip 文件
• 压缩包内需包含同一格式的 txt 或 json 文件。
• json 文件格式:支持 [title, content, extra] 三个字段,分别表示标题、正文、附加信息。若三个字段都存在,则产出 3 组结果,共 9 个文件,统一存放在一个文件夹中。若某字段不存在或内容为空,则该字段不会生成对应结果
voice_modify
object
audio_setting
object
voice_setting
object
必填
aigc_watermark
boolean
默认值:false
控制在合成音频的末尾添加音频节奏标识,默认值为 False。该参数仅对非流式合成生效
language_boost
string
是否增强对指定的小语种和方言的识别能力。默认值为 null,可设置为 auto 让模型自主判断。可选值:Chinese, Chinese,Yue, English, Arabic, Russian, Spanish, French, Portuguese, German, Turkish, Dutch, Ukrainian, Vietnamese, Indonesian, Japanese, Italian, Korean, Thai, Polish, Romanian, Greek, Czech, Finnish, Hindi, Bulgarian, Danish, Hebrew, Malay, Persian, Slovak, Swedish, Croatian, Filipino, Hungarian, Norwegian, Slovenian, Catalan, Nynorsk, Tamil, Afrikaans, auto
pronunciation_dict
object

响应

file_id
integer
任务创建成功后返回的对应音频文件的 ID。

• 当任务完成后,可通过 file_id 查询。当请求出错时,不返回该字段
注意:返回的下载 URL 自生成起 9 小时(32400 秒)内有效,过期后文件将失效,生成的信息便会丢失,请注意下载信息的时间
task_id
string
异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 以获取生成结果
base_resp
object
task_token
string
完成当前任务使用的密钥信息
usage_characters
integer
计费字符数
最后修改于 2026年7月8日