task_id。task_id 调用“查询任务结果”接口,直至 status 为 completed,从 output.file_url 获取结果视频地址。version 选择擦除档位,对输入视频进行字幕/水印擦除与区域内容补全。参数名 | 必选 | 类型 | 描述 |
video_url | 是 | string | 输入视频地址,支持 http(s) 公网 URL 或 data:video/...;base64,... 形态,Base64 解码后不超过 20 MB。示例:https://example.com/input.mp4 |
version | 否 | string | 擦除档位,大小写敏感。 1.0-lite(默认):仅擦除字幕,速度快、费用低;1.0-premium:可擦除字幕、水印等更复杂的叠加内容,擦除与补全效果更好,价格较高、耗时较长。 |
curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/tool/video-erase' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-H 'Content-Type: application/json' \\-d '{"video_url": "https://example.com/input.mp4","version": "1.0-lite"}'
curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/tool/video-erase' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-H 'Content-Type: application/json' \\-d '{"video_url": "https://example.com/input.mp4","version": "1.0-premium"}'
参数名 | 类型 | 描述 |
task_id | string | 任务唯一标识,用于调用查询接口轮询。 |
status | string | 任务状态。 |
request_id | string | 唯一请求标识,排查问题时请携带。 |
{"task_id": "1400000001-ProcessMediaByMPS-xxxxxxxx","status": "queued","request_id": "9f1c0b7e-e024-426a-bb00-839553cb58c9"}
status 为 completed 或 failed。GET https://tokenhub.tencentmaas.com/v1/wand/tool/video-erase/tasks/{task_id}参数名 | 必选 | 类型 | 描述 |
task_id | 是 | string | 路径参数。提交接口返回的任务 ID,需原样传入。 |
curl -X GET 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/tool/video-erase/tasks/1400000001-ProcessMediaByMPS-xxxxxxxx' \\-H 'Authorization: Bearer YOUR_API_KEY'
参数名 | 类型 | 描述 |
task_id | string | 任务唯一标识。 |
status | string | 任务状态: queued / in_progress / completed / failed。 |
progress | integer | 处理进度,0~100。 |
output | object | 结果产物,仅 completed 时返回。 |
output.file_url | string | 结果视频地址,可直接下载或播放。 |
error | object | 失败详情,仅 failed 时返回。 |
error.code | string | 错误码,见“统一错误码”。 |
error.message | string | 错误描述,用于排查,不建议用于程序逻辑判断。 |
request_id | string | 唯一请求标识,排查问题时请携带。 |
{"task_id": "1400000001-ProcessMediaByMPS-xxxxxxxx","status": "in_progress","progress": 50,"request_id": "0a7d2c31-e024-426a-bb00-839553cb58c9"}
{"task_id": "1400000001-ProcessMediaByMPS-xxxxxxxx","status": "completed","progress": 100,"output": {"file_url": "https://xxxxxxx.mp4"},"request_id": "5c93e410-e024-426a-bb00-839553cb58c9"}
{"task_id": "1400000001-ProcessMediaByMPS-xxxxxxxx","status": "failed","progress": 0,"error": {"code": "FailedOperation","message": "Operation failed."},"request_id": "5c93e410-e024-426a-bb00-839553cb58c9"}
error.code)统一如下:错误码 | 错误信息 | 说明 |
InvalidParameter | One or more parameters specified in the request are not valid. | 请求中存在一个或多个非法参数(含 video_url 缺失、URL 格式非法、version 枚举值非法等)。请对照文档核对参数名、类型、取值范围后重试。 |
MissingParameter | The request failed because it is missing %s parameter. | 请求缺少必填参数 %s。请补齐后重试。 |
InvalidParameterValue.ModelVersion | The value of version is not supported. | version 取值不受支持。 |
SourceFileError | The source file could not be downloaded or decoded. | 源文件无法下载或解码:URL 不可访问、已过期、内容损坏或格式不支持。请检查源地址可访问性与文件完整性后重新提交。 |
FailedOperation | Operation failed. | 处理失败(下游异常)。可重试;持续失败时请携带 Request ID 提工单排查。 |
InternalError | The service encountered an unexpected internal error. Please retry later. | 服务内部出现未预期错误。可重试;持续复现时请携带 Request ID 提工单排查。 |
Unauthorized | The API key is missing or invalid. | API Key 缺失或无效,请检查请求头 Authorization。 |
InsufficientQuota | The account balance is insufficient. | 账号欠费或无有效套餐,请检查计费状态。 |
Forbidden | The account is forbidden, frozen or recycled. | 账号被禁用、冻结或已回收,请联系客服。 |
ResourceNotFound | The requested resource does not exist. | 请求路径或任务不存在,请检查路径与 task_id 拼写。 |
RequestTooLarge | The request entity is larger than the limit allowed. | 请求体或内联 Base64 素材超过上限,请改用公网 URL 输入。 |
TooManyRequests | The request rate limit has been exceeded. | 触发 QPS 限频或配额用尽,请降低频率后重试。 |
version 档位。1.0-lite;需要处理水印等更复杂叠加内容、对补全效果要求更高,选 1.0-premium。注意 1.0-premium 耗时明显更长、费用更高,建议先用短视频验证效果。1.0-premium 档位;若字幕区域背景复杂(如动态纹样、人脸重叠),可反馈样例联系技术支持评估。文档反馈