microsoft-foundry.rest.security.o-auth2-auth
Videos
Delete a video
DELETE
/openai/v1/videos/{video_id}
Deletes a video by its identifier.
Sökvägsparametrar
video_id
string
krävs
The identifier of the video to delete.
Svar
The request has succeeded.
Brödtext
Content-Type: application/json
object
enum
krävs
The object type that signals the deletion response.
video.deleted
deleted
boolean
krävs
Indicates that the video resource was deleted.
id
string
krävs
Identifier of the deleted video.
Förfrågan
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);