查询任务
- 查询以 OpenAI 兼容格式提交的视频任务状态与结果
- 状态流转:queued → in_progress → completed / failed
- 完成后从
data.video_url取直链,或用下载接口经网关取回
认证
所有接口均使用 Bearer Token 进行认证。
Seedance 系列的接口需要在 ark 站 单独获取 Key,与 api 站的 Key 不通用。
请求时在请求头中添加:
Authorization: Bearer YOUR_ARK_KEYAll endpoints authenticate with a Bearer token.
Seedance series endpoints require a key obtained separately from the ark site; it isn't shared with the api site's key.
Add it to the request header:
Authorization: Bearer YOUR_ARK_KEY路径参数
提交任务时返回的任务 ID。
The task ID returned when the task was submitted.
状态流转
QUEUED -> IN_PROGRESS -> SUCCESS 成片可取
-> FAILURE 查看 fail_reasonQUEUED:已受理,排队中IN_PROGRESS:生成中,data.progress为百分比字符串,如50%SUCCESS:已完成,成片地址在data.video_urlFAILURE:已失败,原因在data.fail_reason
轮询节奏:每 5 秒一次,总超时约 10 分钟。多数 Seedance 任务在 1 到 3 分钟内完成。
QUEUED -> IN_PROGRESS -> SUCCESS video ready
-> FAILURE see fail_reasonQUEUED: accepted, queuedIN_PROGRESS: generating, withdata.progressas a percentage string such as50%SUCCESS: done; the video URL is indata.video_urlFAILURE: failed; the reason is indata.fail_reason
Polling cadence: every 5 seconds, with an overall timeout of about 10 minutes. Most Seedance tasks finish within 1 to 3 minutes.
响应
固定为 success。
通常为空字符串。
任务在库内的自增 ID。
任务 ID,与请求路径里的值一致。
任务类型,如 text_to_video、image_to_video。
取值 QUEUED、IN_PROGRESS、SUCCESS、FAILURE。
失败原因,成功时为空字符串。
成片地址,成功后才有。
与 result_url 同值的成片地址,给按 OpenAI 视频字段名解析的客户端使用。成功后才有。
末帧图片地址。上游产出末帧时才有,例如豆包在提交时把 return_last_frame 设为 true。
进度百分比字符串,如 100%。
提交时间,Unix 秒。
开始时间,Unix 秒,未开始为 0。
结束时间,Unix 秒,未结束为 0。
本次任务使用的模型信息,含 input、origin_model_name、upstream_model_name。
上游返回的原始任务快照。不同渠道结构不同,例如豆包是 { id, model, status, content: { video_url, last_frame_url }, usage }。
Always success.
Usually an empty string.
The task's auto-increment row ID.
The task ID, matching the path parameter.
Task kind, e.g. text_to_video or image_to_video.
One of QUEUED, IN_PROGRESS, SUCCESS, FAILURE.
The failure reason; an empty string on success.
The video URL, present after success.
The same video URL under the name OpenAI video clients read. Present after success.
The trailing-frame image URL, present only when the upstream produces one (for example Doubao with return_last_frame set to true on submit).
The progress as a percentage string such as 100%.
Submit time, in Unix seconds.
Start time, in Unix seconds; 0 before it starts.
Finish time, in Unix seconds; 0 until it finishes.
Model information for this task: input, origin_model_name, upstream_model_name.
The raw upstream task snapshot. Its shape depends on the channel; Doubao returns { id, model, status, content: { video_url, last_frame_url }, usage }.
取回成片
SUCCESS 之后有两种取法:
- 直接用
data.video_url里的直链 - 调
GET /v1/videos/{task_id}/content经网关下载,需要鉴权,地址不外泄
After SUCCESS there are two ways to get it:
- Use the direct link in
data.video_url - Call
GET /v1/videos/{task_id}/contentto download through the gateway; requires authentication and keeps the address from leaking
错误码
| HTTP | Meaning |
|---|---|
| 401 | Token missing or invalid, with type authentication_error |
For more status codes and retry guidance see Error codes and rate limits; for troubleshooting steps on common errors see the FAQ.