MiniMax Speech 2.8 HD
集成
模型 id
minimax/speech-2.8-hd
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/minimax/speech-2.8-hd?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Welcome aboard. Tonight we cruise along the northern coast, where the lighthouse has guided sailors home for two hundred years. Find a warm seat on the upper deck and enjoy the view."
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/minimax/speech-2.8-hd?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "Welcome aboard. Tonight we cruise along the northern coast, where the lighthouse has guided sailors home for two hundred years. Find a warm seat on the upper deck and enjoy the view."
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "Welcome aboard. Tonight we cruise along the northern coast, where the lighthouse has guided sailors home for two hundred years. Find a warm seat on the upper deck and enjoy the view.",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/minimax/speech-2.8-hd", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
# 1. Connect once (Claude Code; Cursor, VS Code, Claude Desktop: https://doitong.com/zh/developers/docs/mcp)
claude mcp add --transport http doitong-models https://api.doitong.com/v1/mcp \
--header "Authorization: Bearer $DOITONG_API_KEY"
# 2. Your agent calls the "run" tool with:
{
"model_id": "minimax/speech-2.8-hd",
"input": {
"prompt": "Welcome aboard. Tonight we cruise along the northern coast, where the lighthouse has guided sailors home for two hundred years. Find a warm seat on the upper deck and enjoy the view."
}
}
通过 Doitong API 调用 MiniMax Speech 2.8 HD 模型(minimax/speech-2.8-hd)。智能体文档:https://doitong.com/zh/developers/models/minimax/speech-2.8-hd.md
POST https://api.doitong.com/v1/run/minimax/speech-2.8-hd?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{
"prompt": "Welcome aboard. Tonight we cruise along the northern coast, where the lighthouse has guided sailors home for two hundred years. Find a warm seat on the upper deck and enjoy the view."
}
如果响应状态为 "queued" 或 "running",请轮询 GET https://api.doitong.com/v1/requests/REQUEST_ID?wait=20,直到状态变为 "succeeded";文件位于 outputs[].url。使用相同请求体 POST https://api.doitong.com/v1/quote/minimax/speech-2.8-hd,可在运行前返回确切价格。
此请求: $0.019 19 API 积分 在此页面运行
你的新 API 密钥。 它仅在此时显示,并且已填入下方的代码和 API 密钥字段中。请妥善保密:切勿将其放入在浏览器中运行的代码。
示例
构建请求
控件根据模型架构生成。更改控件时,代码和价格会同步更新。
POST
/run/minimax/speech-2.8-hd?wait=20
报价 → $0.019
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/minimax/speech-2.8-hd?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Welcome aboard. Tonight we cruise along the northern coast, where the lighthouse has guided sailors home for two hundred years. Find a warm seat on the upper deck and enjoy the view."
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/minimax/speech-2.8-hd?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "Welcome aboard. Tonight we cruise along the northern coast, where the lighthouse has guided sailors home for two hundred years. Find a warm seat on the upper deck and enjoy the view."
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "Welcome aboard. Tonight we cruise along the northern coast, where the lighthouse has guided sailors home for two hundred years. Find a warm seat on the upper deck and enjoy the view.",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/minimax/speech-2.8-hd", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run",
"arguments": {
"model_id": "minimax/speech-2.8-hd",
"input": {
"prompt": "Welcome aboard. Tonight we cruise along the northern coast, where the lighthouse has guided sailors home for two hundred years. Find a warm seat on the upper deck and enjoy the view."
},
"wait_seconds": 20
}
}
}
关于 MiniMax Speech 2.8 HD
MiniMax Speech 2.8 HD 可将文本转换为 30 多种语言的语音,并提供精细控制:内联暂停标记、语速、音调和音量、自定义发音词典以及声音效果。可从内置音色中选择,并设置输出采样率和格式。
参数
名称类型
默认值允许值
描述
prompt必填
类型string
≤ 10,000 个字符
用于语音合成的文本,使用 `<#x#>` 指定停顿,其中 x 的范围为 0.01 到 99.99 秒。可用的插入语标签包括 `(laughs)`、`(sighs)`、`(coughs)`、`(clears throat)`、`(gasps)`、`(sniffs)`、`(groans)` 和 `(yawns)`。
voice_setting可选
类型object
默认值{"english_normalization":false,"pitch":0,"speed":1,"voice_id":"Wise_Woman","vol":1}
用于配置语音的设置。
voice_setting.voice_id可选
类型string
默认值Wise_Woman
≥ 1 characters
用于语音合成的预定义语音标识符。
voice_setting.speed可选
类型number
默认值1
0.5 – 2
语速,范围为 0.5 至 2.0。
voice_setting.vol可选
类型number
默认值1
0.01 – 10
输出音量,范围为 0 至 10。
voice_setting.pitch可选
类型integer
默认值0
-12 – 12
语音音调,范围为 -12 至 12。
voice_setting.emotion可选
类型enum
happysadangryfearfuldisgustedsurprisedneutral
合成语音的情感语调。
voice_setting.english_normalization可选
类型boolean
默认值false
英语文本规范化选项,以少量额外延迟换取更好的数字朗读效果。
audio_setting可选
类型object
用于配置音频的设置。
audio_setting.sample_rate可选
类型enum
默认值32000
80001600022050240003200044100
生成音频的采样率。
audio_setting.bitrate可选
类型enum
默认值128000
3200064000128000256000
生成音频的比特率。
audio_setting.format可选
类型enum
默认值mp3
mp3pcmflac
音频格式。
audio_setting.channel可选
类型enum
默认值1
12
音频声道数:1 表示单声道,2 表示立体声。
language_boost可选
类型enum
ChineseChinese,YueEnglishArabicRussianSpanishFrenchPortugueseGermanTurkishDutchUkrainianVietnameseIndonesianJapaneseItalian
另外 22 个
KoreanThaiPolishRomanianGreekCzechFinnishHindiBulgarianDanishHebrewMalaySlovakSwedishCroatianHungarianNorwegianSlovenianCatalanNynorskAfrikaansauto改善对所选语言和方言的识别效果。
output_format可选
类型enum
默认值hex
urlhex
输出内容格式;仅适用于非流式响应。
pronunciation_dict可选
类型object
用于替换文本的自定义发音词典。
pronunciation_dict.tone_list可选
类型string[]
使用语法 ['text/(pronunciation)', ...] 的发音替换列表,例如 ['燕少飞/(yan4)(shao3)(fei1)']。中文声调数字范围为 1 到 5。
normalization_setting可选
类型object
控制音频响度标准化的设置。
normalization_setting.enabled可选
类型boolean
默认值true
启用音频响度标准化。
normalization_setting.target_loudness可选
类型number
默认值-18
-70 – -10
目标响度,以 LUFS 为单位;默认为 -18.0。
normalization_setting.target_range可选
类型number
默认值8
0 – 20
目标响度范围,以 LU 为单位;默认为 8.0。
normalization_setting.target_peak可选
类型number
默认值-0.5
-3 – 0
目标峰值电平,以 dBTP 为单位;默认为 -0.5。
voice_modify可选
类型object
用于修改音高、强度和音色的设置。
voice_modify.pitch可选
类型integer
默认值0
-100 – 100
以半音为单位的音高控制:使用负值降低音高,使用正值提高音高。允许的值范围为 -100 到 100。
voice_modify.intensity可选
类型integer
默认值0
-100 – 100
语音能量控制;设置值越高,语音越有活力。允许范围为 -100 到 100。
voice_modify.timbre可选
类型integer
默认值0
-100 – 100
从 -100 到 100 的语音音色调节,用于控制音调特征。
必填
输出
GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
"id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
"object": "request",
"model": "minimax/speech-2.8-hd",
"status": "succeeded",
"created_at": "2026-10-20T12:00:00Z",
"started_at": "2026-10-20T12:00:02Z",
"completed_at": "2026-10-20T12:00:09Z",
"queue_position": null,
"cost": {
"credits": 19,
"usd": "0.019",
"charged": 19,
"refunded": 0
},
"input": {
"prompt": "Hello! Welcome to our new studio. <#0.5#> Let's make something wonderful today."
},
"output": {
"audio": {
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
"content_type": "audio/mpeg",
"file_name": "0-output.mp3",
"file_size": 1843200
},
"duration_ms": 1
},
"outputs": [
{
"type": "audio",
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
"content_type": "audio/mpeg",
"file_size": 1843200,
"duration": 12,
"stored": true
}
],
"error": null,
"metrics": {
"inference_seconds": 6.8
},
"urls": {
"self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
"cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
}
}
你的文件,由你选择每个 outputs[].url 都是存储中的副本:可永久保存(按 GB-月付费),也可免费保存 7 天,由账户设置或 ?storage= 决定。
每个模型的结构相同图像、视频和音频均包含 type、url、content_type、width、height 和 duration。output 是模型自身的结果对象。
输出字段
- audio
- object {url, content_type, file_name, file_size}生成的音频文件。
- duration_ms
- integer音频长度,以毫秒为单位。
其他 MiniMax Speech 变体
更多模型:文本转语音
对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh/developers/models/minimax/speech-2.8-hd.md. 所有模型和指南: https://doitong.com/developers/llms.txt