视频任务列表
查询当前用户近 24 小时的视频生成任务列表。该接口是前台令牌接口,只提供 /api/videos/list,不会走 API Key 的 /v1 路径。
端点
| 端点 | 鉴权 | 用途 |
|---|---|---|
GET /api/videos/list | token: <jwt> | 前台用户查询自己的近 24 小时视频任务 |
管理员 JWT 也可使用 Authorization: Bearer <jwt> 访问,但普通前台 JWT 推荐放在 token 请求头。
Query 参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
p | integer | 否 | 页码,默认 1 |
page_size | integer | 否 | 每页数量,未传时使用平台默认分页大小 |
model | string | 否 | 按模型名过滤,例如 sora-2 |
platform | string | 否 | 按任务平台过滤,例如 openai_azure_video、vertex_video、volcengine_video、aliyun_video |
status | string | 否 | 按任务状态过滤,例如 QUEUED、IN_PROGRESS、SUCCESS、FAILURE |
task_ids | string | 否 | 多个任务 ID 用英文逗号分隔 |
接口固定查询近 24 小时内、任务类型为视频生成的记录。
请求示例
- cURL
- JavaScript
curl "https://api-platform.ope.ai/api/videos/list?p=1&page_size=20&status=SUCCESS" \
-H "token: $OPEAI_FRONTEND_JWT"
const res = await fetch("https://api-platform.ope.ai/api/videos/list?p=1&page_size=20", {
headers: {token: process.env.OPEAI_FRONTEND_JWT},
});
console.log(await res.json());
响应示例
{
"success": true,
"message": "",
"data": {
"list": [
{
"id": 123,
"task_id": "video_690d9b52e2b081908a05ded32cbfc629",
"created_at": 1762499410,
"status": "SUCCESS",
"properties": {
"input": "生成展示 AI 视频生成能力的短片,科技感,高清。",
"size": "720x1280"
},
"model": "sora-2"
}
],
"total": 1,
"page": 1,
"page_size": 20
}
}