MiniMax Speech
curl --request POST \
--url https://api.ppio.com/v3/minimax/v1/t2a_v2import requests
url = "https://api.ppio.com/v3/minimax/v1/t2a_v2"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.ppio.com/v3/minimax/v1/t2a_v2', 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/minimax/v1/t2a_v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ppio.com/v3/minimax/v1/t2a_v2"
req, _ := http.NewRequest("POST", url, nil)
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/minimax/v1/t2a_v2")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/v3/minimax/v1/t2a_v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body音频
MiniMax Speech
POST
/
v3
/
minimax
/
v1
/
t2a_v2
MiniMax Speech
curl --request POST \
--url https://api.ppio.com/v3/minimax/v1/t2a_v2import requests
url = "https://api.ppio.com/v3/minimax/v1/t2a_v2"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.ppio.com/v3/minimax/v1/t2a_v2', 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/minimax/v1/t2a_v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ppio.com/v3/minimax/v1/t2a_v2"
req, _ := http.NewRequest("POST", url, nil)
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/minimax/v1/t2a_v2")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/v3/minimax/v1/t2a_v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body官方文档参考:
- 语音识别:MiniMax - 语音识别 API 参考
- 同步语音合成:MiniMax - 同步语音合成 API 参考
- 异步语音合成:MiniMax - 异步语音合成 API 参考
- 音色复刻:MiniMax - 音色快速复刻 API 参考
- 音色设计:MiniMax - 音色设计 API 参考
一、支持模型
| 模型 | 说明 |
|---|---|
| MiniMax Speech to Text | 实际调用名称参考官方文档 |
| MiniMax Speech 2.8 hd | 实际调用名称参考官方文档 |
| MiniMax Speech 2.8 turbo | 实际调用名称参考官方文档 |
二、语音生成 API
语音识别
POST https://{api_domain}/v3/minimax/v1/speech_to_text
curl -X POST 'https://{api_domain}/v3/minimax/v1/speech_to_text' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'language: en' \
-F 'model=asr-1.0' \
-F 'response_format=verbose_json' \
-F 'file=@meeting.mp3'
同步语音合成
POST https://{api_domain}/v3/minimax/v1/t2a_v2
curl -X POST 'https://{api_domain}/v3/minimax/v1/t2a_v2' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "speech-2.8-hd",
"text": "Welcome to our service.",
"stream": false,
"voice_setting": {
"voice_id": "male-qn-qingse",
"speed": 1,
"vol": 1,
"pitch": 0
},
"audio_setting": {
"sample_rate": 32000,
"bitrate": 128000,
"format": "mp3",
"channel": 1
},
"output_format": "url"
}'
异步长文本语音合成:
创建任务
POST https://{api_domain}/v3/minimax/v1/t2a_async_v2
curl -X POST 'https://{api_domain}/v3/minimax/v1/t2a_async_v2' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "speech-2.8-turbo",
"text": "A longer narration.",
"voice_setting": {
"voice_id": "audiobook_male_1",
"speed": 1,
"vol": 1,
"pitch": 0
}
}'
查询任务
GET https://{api_domain}/v3/minimax/v1/query/t2a_async_query_v2?task_id={task_id}
curl -X GET 'https://{api_domain}/v3/minimax/v1/query/t2a_async_query_v2?task_id=95157322514444' \
-H 'Authorization: Bearer <YOUR_API_KEY>'
文件管理:
上传文件:
POST https://{api_domain}/v3/minimax/v1/files/upload
curl -X POST 'https://{api_domain}/v3/minimax/v1/files/upload' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-F 'purpose=voice_clone' \
-F 'file=@voice.wav'
查询文件:
GET https://{api_domain}/v3/minimax/v1/files/retrieve?file_id={file_id}
curl -X GET 'https://{api_domain}/v3/minimax/v1/files/retrieve?file_id=95157322514496' \
-H 'Authorization: Bearer <YOUR_API_KEY>'
下载文件:
GET https://{api_domain}/v3/minimax/v1/files/retrieve_content?file_id={file_id}
curl -X GET 'https://{api_domain}/v3/minimax/v1/files/retrieve_content?file_id=95157322514496' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
--output result.mp3
音色复刻:
POST https://{api_domain}/v3/minimax/v1/voice_clone
curl -X POST 'https://{api_domain}/v3/minimax/v1/voice_clone' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"file_id": 123456789,
"voice_id": "MyVoice001",
"need_noise_reduction": false,
"need_volume_normalization": false
}'
音色设计:
POST https://{api_domain}/v3/minimax/v1/voice_design
curl -X POST 'https://{api_domain}/v3/minimax/v1/voice_design' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "A warm, clear adult narrator with a calm delivery.",
"preview_text": "Welcome to our service."
}'
最后修改于 2026年11月24日