跳转到主要内容
GET
查询任务

授权

Authorization
string
header
必填

在请求头携带 Authorization: Bearer <API Key>。API Key 在 DreamTo 控制台创建,同一账号下的多个 Key 共享素材库。

路径参数

id
string
必填

任务 ID,即创建接口返回的 id(task_ 开头)。不存在或不属于当前账号时返回 404 not_found。

示例:

"task_8c1d2e3f4a5b6c7d8e9f0a1b"

响应

成功

查询任务的响应:任务对象,外加本次请求的 request_id。

id
string
必填

任务 ID(task_ 开头)。

示例:

"task_8c1d2e3f4a5b6c7d8e9f0a1b"

model
string
必填

创建任务时传入的 model,原样回显,不会被改写。

示例:

"seedance-2.0"

status
enum<string>
必填

任务状态。用它做业务分支:running 继续轮询,succeeded 读取 content.video_url,failed 读取 error.message。

可选值:

  • running:处理中(排队中与生成中均为 running),请继续轮询
  • succeeded:成功,读取 content.video_url
  • failed:失败,读取 error.message
可用选项:
running,
succeeded,
failed
created_at
integer<int64>
必填

任务创建时间,Unix 时间戳(秒)。

示例:

1794384000

updated_at
integer<int64>
必填

任务最近更新时间,Unix 时间戳(秒)。

示例:

1794384196

request_id
string
必填

本次请求 ID(req_ 开头),与响应头 X-Request-Id 相同。排查问题时请提供该值与任务 id。

示例:

"req_b2c4d6e8f0a1b3c5d7e9f1a2"

content
object

生成结果,仅 succeeded 时返回。

error
object

失败信息,仅 failed 时返回。

duration
integer<int64>

生成视频的实际时长(秒)。请求 duration: -1(智能时长)时,以本字段为准。

frames_per_second
integer<int64>

生成视频的帧率(FPS)。

ratio
string

生成视频的实际宽高比,例如 16:9。

resolution
string

生成视频的分辨率,例如 720p。

seed
integer<int64>

本次生成实际使用的随机种子,可在新任务中传入 seed 复现相近结果。

generate_audio
boolean

本次是否生成了音频。

output_format
string

输出容器格式,例如 mp4。

service_tier
string

实际使用的服务档位(如模型侧返回)。

priority
integer<int64>

任务优先级(如模型侧返回)。

execution_expires_after
integer<int64>

任务执行超时时间(秒)(如模型侧返回)。

usage
object

Token 用量,任务产生计量后返回。