microsoft-foundry.rest.security.o-auth2-auth
Videos
Delete a video
DELETE
/openai/v1/videos/{video_id}
Deletes a video by its identifier.
Pfadparameter
video_id
string
Erforderlich
The identifier of the video to delete.
Antworten
The request has succeeded.
Text
Content-Type: application/json
object
enum
Erforderlich
The object type that signals the deletion response.
video.deleted
deleted
boolean
Erforderlich
Indicates that the video resource was deleted.
id
string
Erforderlich
Identifier of the deleted video.
Anfordern
import OpenAI from 'openai';
const client = new OpenAI();
const video = await client.videos.delete('video_123');
console.log(video.id);
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("OPENAI_API_KEY"), # This is the default and can be omitted
)
video = client.videos.delete(
"video_123",
)
print(video.id)
package main
import (
"context"
"fmt"
"github.com/openai/openai-go"
"github.com/openai/openai-go/option"
)
func main() {
client := openai.NewClient(
option.WithAPIKey("My API Key"),
)
video, err := client.Videos.Delete(context.TODO(), "video_123")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v
", video.ID)
}
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
video = openai.videos.delete("video_123")
puts(video)
package com.openai.example;
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.videos.VideoDeleteParams;
import com.openai.models.videos.VideoDeleteResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
VideoDeleteResponse video = client.videos().delete("video_123");
}
}
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});
const video = await client.videos.delete('video_123');
console.log(video.id);