跳转到内容
EN

删除视频

先调用「创建视频」,用返回的 ID 替换 video_123;下载前须轮询至 completed。

DELETE/openai/v1/videos/{video_id}● 支持

OpenAI 官方文档 ↗

请求参数

  • video_idstring必填

    path: Id of the video job whose output you want, the id returned by createVideo. The job must be completed; before that the call answers 400.

返回

200 video.deleted

删除任务及其生成的内容。任务不存在返回 404。

错误按 OpenAI 格式返回,参见 错误码

请求示例

curl
# 先调用「创建视频」,用返回的 ID 替换 video_123;下载前须轮询至 completed。
curl -X DELETE https://api.deepraxis.com/openai/v1/videos/video_123 \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
Python
# 先调用「创建视频」,用返回的 ID 替换 video_123;下载前须轮询至 completed。
from openai import OpenAI

client = OpenAI(
    base_url="https://api.deepraxis.com/openai/v1",
    api_key="$PRAXIS_API_KEY",
)

client.videos.delete("video_123")
TypeScript
// 先调用「创建视频」,用返回的 ID 替换 video_123;下载前须轮询至 completed。
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.deepraxis.com/openai/v1",
  apiKey: "$PRAXIS_API_KEY",
});

await client.videos.delete("video_123");

响应示例 200

{
  "id": "vjob_2f7b73157212463da76762b0",
  "object": "video.deleted",
  "deleted": true
}

响应

HTTP 200

Success

application/json

名称 类型 说明
id string Id of the deleted video job.
object string Object type; always video.deleted.
deleted boolean Always true; the job is no longer readable.