MiniMax Speech 2.6 [HD]
集成
模型 id
minimax/speech-2.6-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.6-hd?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Hello from Doitong. This is a short test sentence."
}'
# 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.6-hd?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "Hello from Doitong. This is a short test sentence."
}),
});
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": "Hello from Doitong. This is a short test sentence.",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/minimax/speech-2.6-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.6-hd",
"input": {
"prompt": "Hello from Doitong. This is a short test sentence."
}
}
通过 Doitong API 调用 MiniMax Speech 2.6 [HD] 模型(minimax/speech-2.6-hd)。智能体文档:https://doitong.com/zh/developers/models/minimax/speech-2.6-hd.md
POST https://api.doitong.com/v1/run/minimax/speech-2.6-hd?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{
"prompt": "Hello from Doitong. This is a short test sentence."
}
如果响应状态为 "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.6-hd,可在运行前返回确切价格。
此请求: $0.005 5 API 积分 在此页面运行
你的新 API 密钥。 它仅在此时显示,并且已填入下方的代码和 API 密钥字段中。请妥善保密:切勿将其放入在浏览器中运行的代码。
构建请求
控件根据模型架构生成。更改控件时,代码和价格会同步更新。
POST
/run/minimax/speech-2.6-hd?wait=20
报价 → $0.005
# 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.6-hd?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Hello from Doitong. This is a short test sentence."
}'
# 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.6-hd?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "Hello from Doitong. This is a short test sentence."
}),
});
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": "Hello from Doitong. This is a short test sentence.",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/minimax/speech-2.6-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.6-hd",
"input": {
"prompt": "Hello from Doitong. This is a short test sentence."
},
"wait_seconds": 20
}
}
}
关于 MiniMax Speech 2.6 [HD]
朗读 `prompt` 中提供的文本(最多 10000 个字符),段落换行使用换行符标记,自定义暂停使用 `<#x#>` 标记插入。除 `voice_setting`、`audio_setting`、`language_boost`(38 个选项)和 `pronunciation_dict` 外,还提供用于控制响度的 `normalization_setting`。输出为音频及其毫秒级时长。
参数
名称类型
默认值允许值
描述
enable_safety_checker可选
类型boolean
默认值true
调用方获得授权后,可将其设置为 false 以放宽审核。
prompt必填
类型string
≤ 10,000 个字符
语音输入文本,换行表示段落边界,可选的 `<#x#>` 标记用于控制停顿。标记只能放在可朗读片段之间,不能连续出现;`x` 表示以秒为单位的停顿时间,范围为 `[0.01, 99.99]`,最多使用两位小数。
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。
必填
输出
GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
"id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
"object": "request",
"model": "minimax/speech-2.6-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": 5,
"usd": "0.005",
"charged": 5,
"refunded": 0
},
"input": {
"prompt": "Hello from Doitong. This is a short test sentence."
},
"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.6-hd.md. 所有模型和指南: https://doitong.com/developers/llms.txt