列出视频
GET
/openai/v1/videos● 支持请求参数
afterstring可选query: Cursor: the id of the video job after which the page starts, normally the
last_idof the previous page. It must refer to an existing job of yours, otherwise the call fails.分页参数生效;limit 为 1–100,order 为 asc/desc,after 必须引用存在的任务。
limitinteger可选query: Maximum number of jobs per page, from 1 to 100; defaults to 20.
分页参数生效;limit 为 1–100,order 为 asc/desc,after 必须引用存在的任务。
orderany可选query: Sort order by creation time: desc (default) lists the newest job first, asc the oldest first.
分页参数生效;limit 为 1–100,order 为 asc/desc,after 必须引用存在的任务。
返回
200 list
列出本账号的视频任务。limit 为 1 到 100,order 为 asc 或 desc,after 必须引用存在的任务。
错误按 OpenAI 格式返回,参见 错误码
请求示例
curl
curl https://api.deepraxis.com/openai/v1/videos \
-H "Authorization: Bearer $PRAXIS_API_KEY"Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.deepraxis.com/openai/v1",
api_key="$PRAXIS_API_KEY",
)
videos = client.videos.list()TypeScript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.deepraxis.com/openai/v1",
apiKey: "$PRAXIS_API_KEY",
});
const videos = await client.videos.list();响应示例 200
{
"object": "list",
"data": [
{
"id": "vjob_2f7b73157212463da76762b0",
"object": "video",
"model": "wan2.7-t2v",
"status": "queued",
"progress": 0,
"created_at": 1791870977,
"completed_at": null,
"expires_at": null,
"seconds": "4",
"size": "1280x720",
"prompt": "A cat stretching in the morning sun",
"remixed_from_video_id": null,
"error": null,
"polling_url": "/model/v1/videos/vjob_2f7b73157212463da76762b0",
"unsigned_urls": []
}
],
"has_more": false,
"first_id": "vjob_2f7b73157212463da76762b0",
"last_id": "vjob_2f7b73157212463da76762b0"
}响应
HTTP 200
Success
application/json
| 名称 | 类型 | 说明 |
|---|---|---|
| object | string | Object type; always list. |
| data | array<object> | Video jobs of the caller, newest first by default. |
| data[].id | string | Id of the video job; pass it as video_id to retrieve, download or delete it. |
| data[].object | string | Object type; always video. |
| data[].model | string | Model that generates the video. |
| data[].status | string | Lifecycle of the job. Poll until it is completed or failed. |
| data[].progress | integer | Progress from 0 to 100. It is 0 until the job completes and 100 once it has. |
| data[].created_at | integer | Unix time in seconds at which the job was created. |
| data[].completed_at | integer | null | Unix time in seconds at which the job completed; null until then. |
| data[].expires_at | integer | null | Unix time in seconds after which the output expires; null because outputs currently have no expiry. |
| data[].seconds | string | Length of the video in seconds, as a string; for a completed job it is the delivered length. |
| data[].size | string | Resolution of the video as WIDTHxHEIGHT; null when the provider did not report one. |
| data[].prompt | string | null | Prompt the job was created with. |
| data[].remixed_from_video_id | null | Always null; remix is not supported. |
| data[].error | object | null | Why the job failed; null unless status is failed. |
| data[].polling_url | string | Relative URL to poll for the job state; same as retrieveVideo for this job. |
| data[].unsigned_urls | array<string> | Relative URLs of the finished output; empty until the video is ready. Download them with the same API key. |
| data[].usage | object | Cost of the job; present once a price applies. |
| has_more | boolean | Whether more jobs exist beyond this page; pass last_id as after to read them. |
| first_id | string | null | Id of the first job in this page; null for an empty page. |
| last_id | string | null | Id of the last job in this page; null for an empty page. |