跳转到主要内容
GET
/
v1
/
tasks
/
{task_id}
查询任务状态
curl --request GET \
  --url https://api.foxapi.cc/v1/tasks/{task_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "task-unified-1757165031-uyujaw3d",
  "object": "video.generation.task",
  "type": "video",
  "model": "lipsync-2",
  "status": "pending",
  "progress": 0,
  "created": 1757165031,
  "results": null,
  "error": null,
  "usage": {
    "credits_reserved": 5,
    "user_group": "default"
  }
}

授权

Authorization
string
header
必填

所有接口均需要使用Bearer Token进行认证

使用时在请求头中添加:

Authorization: Bearer YOUR_API_KEY

路径参数

task_id
string
必填

任务ID,由提交任务接口返回

示例:

"task-unified-1757165031-uyujaw3d"

响应

查询成功

id
string

任务ID

示例:

"task-unified-1757165031-uyujaw3d"

object
enum<string>

任务的具体类型

可用选项:
video.generation.task,
image.generation.task,
audio.generation.task
示例:

"video.generation.task"

type
enum<string>

任务的输出类型

可用选项:
video,
image,
audio
示例:

"video"

model
string

实际使用的模型名称

示例:

"lipsync-2"

status
enum<string>

任务状态

可选值:

含义
pending等待处理
processing处理中
completed已完成
failed已失败
可用选项:
pending,
processing,
completed,
failed
示例:

"pending"

progress
integer

任务进度百分比

必填范围: 0 <= x <= 100
示例:

0

created
integer

任务创建时间戳(Unix 秒)

示例:

1757165031

results
object[] | null

任务结果列表,仅在 status=completed 时有值

说明:

  • 结果中的 URL 有效期为24小时
  • 不同模型返回的字段可能不同(如视频含 width/height,音频含 duration
error
object

错误信息,仅在 status=failed 时有值

usage
object

计费信息