Gateway Protocols多标准协议兼容
OpenAIAnthropicGeminiOpenRouter
Chat / Responses / Messages / Claude MessagesGET /v1/videos/{taskId}
视频任务查询
去调试查询视频生成任务状态与结果;Gateway 主查询路径为 GET /v1/videos/{taskId},同时继续支持火山原生查询路径 GET /api/v3/contents/generations/tasks/{id}。
接口信息
输入参数
接口清单
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
GET /v1/videos/{taskId} | path | 推荐新接入 | Gateway 主查询路径;成功时返回 data[].video_url。 |
GET /api/v3/contents/generations/tasks/{id} | path | 火山原接口仍支持 | 火山方舟 Seedance 原生查询路径;成功时返回 content.video_url。 |
输入参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
taskId | string | 是 | 路径参数,POST /v1/videos 返回的 task_id/taskId。 |
输出参数
| 参数 | 类型 | 返回 | 说明 |
|---|---|---|---|
task_id | string | 是 | 视频生成任务 ID。 |
taskId | string | 是 | 同 task_id。 |
status | string | 是 | 任务状态:pending、running、succeeded、failed、canceled。 |
error | object | string | null | 失败时 | 错误提示信息。 |
error.code | string | 失败时 | 错误码。 |
error.message | string | 失败时 | 错误提示信息。 |
created | integer | 否 | 任务创建时间的 Unix 时间戳,单位秒。 |
finished_at | integer | 否 | 任务完成时间的 Unix 时间戳,单位秒。 |
data | object[] | 成功时 | 视频生成任务的输出内容。 |
data[].video_url | string | 成功时 | 生成视频 URL。 |
data[].url | string | 兼容返回 | 部分线路可能使用 url 字段表示视频地址。 |
usage | object | 按需返回 | 本次请求的 token 用量。 |
usage.completion_tokens | integer | 按需返回 | 模型生成视频消耗的 token 数量,可作为计费对账依据。 |
usage.total_tokens | integer | 按需返回 | 本次请求消耗的总 token。 |
补充说明
- GET /v1/videos/{taskId} 是 Gateway 视频任务查询主入口。
- 火山方舟原生查询接口仍支持:GET /api/v3/contents/generations/tasks/{id},该路径会返回 content.video_url。
错误代码
| HTTP 状态码 | 错误 | 说明 |
|---|---|---|
401 | Unauthorized | Client Key 无效或未提供。 |
404 | Not Found | 任务不存在或不可访问。 |
在线调试
id创建视频任务接口返回的 id
curl -X GET 'https://api.4stoken.cn/v1/videos/img-your-task-id' \ -H 'Authorization: Bearer YOUR_API_KEY'
在线调试会向 Gateway 发起真实请求并可能产生费用。请确认参数无误后再点击。

