curl --request POST 'https://api.voicecheap.ai/v1/actions/subtitles_burn_history_get' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"historyId":"history_20261016_001"}'
const input = {
historyId: 'history_20261016_001',
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/subtitles_burn_history_get', {
method: 'POST',
headers: {
'x-api-key': process.env.VOICECHEAP_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify(input),
});
const body = await response.json();
if (!response.ok) throw new Error(body.code + ': ' + body.message);
console.log(body);
import os
import requests
response = requests.post(
"https://api.voicecheap.ai/v1/actions/subtitles_burn_history_get",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"historyId": "history_20261016_001"},
timeout=120,
)
body = response.json()
if not response.ok:
raise RuntimeError(f"{body.get('code')}: {body.get('message')}")
print(body)
{
"data": {
"historyId": "history_20261016_001",
"fileName": "interview.mp4",
"createdAt": 1792152000000,
"updatedAt": 1792152000000,
"fileSizeBytes": 1048576,
"fileSizeMb": 1,
"durationSeconds": 60,
"durationMinutes": 1,
"mimeType": "video/mp4",
"extension": "mp4",
"detectedLanguage": "en",
"status": "success",
"sourceType": "upload",
"sourceSrtContent": "1\n00:00:00,000 --> 00:00:01,500\nHello world.\n",
"subtitleLayout": {
"maxLinesPerCaption": 2,
"maxCharactersPerLine": 42
},
"subtitleStyle": {
"fontFamily": "sans",
"fontSize": "medium",
"textColor": "white",
"backgroundStyle": "outline",
"position": "bottom"
},
"subtitledVideoUrl": "https://media.example.com/outputs/subtitled-interview.mp4"
}
}
字幕
获取字幕视频结果
读取一个已保存的字幕视频结果,包括输出文本或媒体 URL。
POST
/
v1
/
actions
/
subtitles_burn_history_get
curl --request POST 'https://api.voicecheap.ai/v1/actions/subtitles_burn_history_get' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"historyId":"history_20261016_001"}'
const input = {
historyId: 'history_20261016_001',
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/subtitles_burn_history_get', {
method: 'POST',
headers: {
'x-api-key': process.env.VOICECHEAP_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify(input),
});
const body = await response.json();
if (!response.ok) throw new Error(body.code + ': ' + body.message);
console.log(body);
import os
import requests
response = requests.post(
"https://api.voicecheap.ai/v1/actions/subtitles_burn_history_get",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"historyId": "history_20261016_001"},
timeout=120,
)
body = response.json()
if not response.ok:
raise RuntimeError(f"{body.get('code')}: {body.get('message')}")
print(body)
{
"data": {
"historyId": "history_20261016_001",
"fileName": "interview.mp4",
"createdAt": 1792152000000,
"updatedAt": 1792152000000,
"fileSizeBytes": 1048576,
"fileSizeMb": 1,
"durationSeconds": 60,
"durationMinutes": 1,
"mimeType": "video/mp4",
"extension": "mp4",
"detectedLanguage": "en",
"status": "success",
"sourceType": "upload",
"sourceSrtContent": "1\n00:00:00,000 --> 00:00:01,500\nHello world.\n",
"subtitleLayout": {
"maxLinesPerCaption": 2,
"maxCharactersPerLine": 42
},
"subtitleStyle": {
"fontFamily": "sans",
"fontSize": "medium",
"textColor": "white",
"backgroundStyle": "outline",
"position": "bottom"
},
"subtitledVideoUrl": "https://media.example.com/outputs/subtitled-interview.mp4"
}
}
读取一个已保存的字幕视频结果,包括输出文本或媒体 URL。
所需权限:
POST https://api.voicecheap.ai/v1/actions/subtitles_burn_history_get
身份验证和权限
string
必填
在此请求头中发送 VoiceCheap API 密钥。也支持通过 Authorization: Bearer 发送同一 API 密钥。OAuth 访问令牌仅适用于 MCP,此 REST 端点不接受 OAuth
访问令牌。
subtitles:read.
需要有效的付费订阅。权限不会改变团队角色、资源归属、媒体额度或套餐限制。
参数
string
必填
文本值。最小长度: 1. 最大长度: 160. 匹配模式:
^[A-Za-z0-9_-]+$.完整输入架构
完整输入架构
以下 JSON Schema 保留了发现接口公开的确切字段名、嵌套类型、默认值、范围和可接受值。其他跨字段规则列于操作说明中。
{
"type": "object",
"properties": {
"historyId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[A-Za-z0-9_-]+$"
}
},
"required": ["historyId"],
"additionalProperties": false
}
请求示例
请将示例资源标识符和媒体键替换为账户返回的值。重试同一次修改操作时,请保持请求标识符不变。curl --request POST 'https://api.voicecheap.ai/v1/actions/subtitles_burn_history_get' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"historyId":"history_20261016_001"}'
const input = {
historyId: 'history_20261016_001',
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/subtitles_burn_history_get', {
method: 'POST',
headers: {
'x-api-key': process.env.VOICECHEAP_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify(input),
});
const body = await response.json();
if (!response.ok) throw new Error(body.code + ': ' + body.message);
console.log(body);
import os
import requests
response = requests.post(
"https://api.voicecheap.ai/v1/actions/subtitles_burn_history_get",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"historyId": "history_20261016_001"},
timeout=120,
)
body = response.json()
if not response.ok:
raise RuntimeError(f"{body.get('code')}: {body.get('message')}")
print(body)
响应
首次执行成功时返回 HTTP 200,操作结果位于 data 下。重放请求时可能改为返回已保存的请求状态。示例展示了一种支持的响应,并未包含所有可选字段。 当前账户拥有的完整带字幕视频历史记录项,包含其输出内容。{
"data": {
"historyId": "history_20261016_001",
"fileName": "interview.mp4",
"createdAt": 1792152000000,
"updatedAt": 1792152000000,
"fileSizeBytes": 1048576,
"fileSizeMb": 1,
"durationSeconds": 60,
"durationMinutes": 1,
"mimeType": "video/mp4",
"extension": "mp4",
"detectedLanguage": "en",
"status": "success",
"sourceType": "upload",
"sourceSrtContent": "1\n00:00:00,000 --> 00:00:01,500\nHello world.\n",
"subtitleLayout": {
"maxLinesPerCaption": 2,
"maxCharactersPerLine": 42
},
"subtitleStyle": {
"fontFamily": "sans",
"fontSize": "medium",
"textColor": "white",
"backgroundStyle": "outline",
"position": "bottom"
},
"subtitledVideoUrl": "https://media.example.com/outputs/subtitled-interview.mp4"
}
}
结果字段
| 字段 | 说明 |
|---|---|
data.historyId | 当前账户拥有的网页工具历史条目 ID。 |
data.createdAt | Unix 时间戳,单位为毫秒。 |
data.updatedAt | Unix 时间戳,单位为毫秒。 |
data.sourceType | upload 或 youtube。 |
data.sourceSrtContent | 用于渲染的已保存源 SRT。 |
data.subtitleLayout | 已保存的布局设置。 |
data.subtitleStyle | 已保存的样式设置。 |
data.subtitledVideoUrl | 已渲染完成的输出视频的临时 URL。 |
data.youtubeUrl | 可选的原始 YouTube URL。 |
操作说明
- 需要付费订阅和操作权限。执行时会重新检查调用者的个人工具套餐;已保存的工具和上传引用均属于该调用者,包括凭据与团队关联时。
- 成功操作会消耗一次 API/MCP 共用的每月调用次数。Beginner 每月 500 次、Starter 5,000 次、Creator 25,000 次;Pro、Scale 和 Enterprise 无每月上限。每分钟限制仍然适用,分别为 30、60、120、180、300 和 600 次。工具生成限额单独计算。
- historyId 必须来自对应的当前账户拥有的 history_list 或成功生成结果。其他用户或其他历史集合的 ID 不授予访问权限。
- 此读取操作返回完整的已保存工具历史记录,而不是持久化的集成 resultId。不会再次生成、消耗上传次数或使用每日工具生成次数。
- 每次读取详情时,都会从当前账户拥有的媒体存储中刷新 subtitledVideoUrl。来自 YouTube 的历史记录项会包含 youtubeUrl。同时返回 sourceSrtContent 和渲染设置以供复用。
用量
每次成功调用消耗一次月度 API/MCP 调用额度。媒体额度和操作本身的生成限额也适用。错误
| HTTP 状态 | 代码 | 含义或恢复方式 |
|---|---|---|
| 400 | CREDENTIAL_IN_QUERY | 凭证通过 access_token 或 api_key 查询参数提供。请在标头中发送凭证。 |
| 400 | VALIDATION_ERROR | 参数不符合操作架构,或提供了未知参数。 |
| 401 | API_KEY_EXPIRED | API 密钥已过期。 |
| 401 | INVALID_API_KEY | 请提供有效且未过期的 API 密钥。 |
| 401 | INVALID_CREDENTIAL | Authorization 标头格式错误或与 x-api-key 冲突。 |
| 401 | MISSING_CREDENTIAL | 未提供可用的请求头凭据,或其长度超过 4096 个字符。 |
| 401 | USER_NOT_FOUND | 该凭据对应的账户已不存在。 |
| 403 | AMBIGUOUS_TEAM_API_KEY | 此凭据对应的用户属于多个团队,因此计费上下文不明确。 |
| 403 | INSUFFICIENT_SCOPE | API 密钥或 MCP 连接缺少所需的操作权限。 |
| 403 | INTEGRATION_PLAN_UNSUPPORTED | 无法验证该账户的集成限制。 |
| 403 | PAID_SUBSCRIPTION_REQUIRED | 此工具操作执行时,已认证的调用者已无付费订阅。 |
| 403 | SUBSCRIPTION_REQUIRED | 请使用有效的付费订阅。 |
| 403 | TEAM_OWNER_NOT_FOUND | 找不到实际生效的团队所有者账户。 |
| 404 | ADD_SUBTITLES_HISTORY_NOT_FOUND | 未找到此调用者所请求的带字幕视频历史记录。 |
| 429 | INTEGRATION_MONTHLY_LIMIT_REACHED | 已使用和待处理的调用次数已达到共享的每月 API/MCP 限额。 |
| 429 | INTEGRATION_RATE_LIMIT_REACHED | 该账户已达到每分钟集成调用上限;请检查 retryAfterSeconds。 |
| 500 | INTERNAL_ERROR | 无法读取已保存的历史内容。 |
| 503 | SERVER_RESTARTING | 服务器正在重启。请稍后重试;对于修改操作,请保持请求标识符不变。 |
{
"code": "INSUFFICIENT_SCOPE",
"message": "This credential does not permit the requested action.",
"status": 403,
"details": {
"requiredScopes": ["subtitles:read"]
}
}
此页面对您有帮助吗?

