LoopToken

按游标列出任务

POST /tasks:按时间窗口和状态游标分页列出文生视频、图生视频、动作控制、全能参考视频任务

POST/tasks

按创建时间倒序列出文生视频、图生视频、动作控制、全能参考视频任务。

项值
模式同步查询
计费查询不收费

快速开始

curl https://api.vibelab.me/tasks \
  -H "Authorization: Bearer $LOOPTOKEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "limit": 100,
    "filters": [
      {
        "key": "status",
        "values": [
          "succeeded"
        ]
      }
    ]
  }'

响应示例:

{
  "code": 0,
  "message": "SUCCEED",
  "request_id": "6a0d571e-d36c-4811-bb2b-698c94b19a8c",
  "data": {
    "result": [
      {
        "id": "893605946402811985",
        "status": "succeeded",
        "message": "",
        "create_time": 1781080778802,
        "update_time": 1781080794151,
        "external_id": "your-id",
        "outputs": [
          {
            "type": "video",
            "id": "893605946402811986",
            "url": "https://example.com/result.mp4",
            "watermark_url": "https://example.com/result-wm.mp4",
            "duration": "5"
          }
        ]
      }
    ],
    "count": 1,
    "has_more": false
  }
}

请求参数

请求头

参数类型必填默认说明
Authorizationstring是-Bearer $LOOPTOKEN_API_KEY
Content-Typestring是-application/json

请求体

参数类型必填默认说明
start_timestring否end_time 往前 30 天起始时间(毫秒时间戳)
end_timestring否当前时间结束时间(毫秒时间戳)
cursorstring否-上一页返回的 next_cursor;传入后忽略时间窗口
limitinteger否100每页数量,最大 500
filtersarray否-[{ "key": "status", "values": ["succeeded"] }];key 支持 status(submitted、processing、succeeded、failed)与 product_type(video;传其他值返回空列表)

响应

字段类型说明
codeinteger0 表示成功,其余见错误
messagestring错误信息
request_idstring请求 ID,排查问题时提供
data.resultarray任务列表,字段同查询任务
data.countinteger本页数量
data.has_moreboolean是否还有下一页
data.next_cursorstring下一页游标,仅 has_more 为 true 时返回

计费

查询不收费。

错误

本页参数校验返回 400 / 1201,message 原文如下:

HTTPcode触发场景处理
4001201invalid request body请求体传合法 JSON
4001201end_time must be a millisecond timestamp / start_time must be a millisecond timestamp传毫秒时间戳
4001201start_time must be earlier than end_time起始时间早于结束时间
4001201limit must not exceed 500limit 不超过 500
4001201unknown status filter ...status 取 submitted、processing、succeeded、failed
4001201unknown filter key ...key 只支持 status、product_type
4001201invalid cursor原样传上一页返回的 next_cursor

通用错误(鉴权、余额、并发、回调地址、上游错误)见 Kling 错误。

注意事项

  • limit 不传或小于等于 0 → 按 100 处理。
  • 传 cursor → 忽略 start_time,按游标继续往前翻。

本页内容