Skip to content

Delete video

client.Videos.Delete(ctx, videoID) (*VideoDeleteResponse, error)
DELETE/videos/{video_id}

Delete a video

ParametersExpand Collapse
videoID string
ReturnsExpand Collapse
type VideoDeleteResponse struct{…}

Confirmation payload returned after deleting a video.

ID string

Identifier of the deleted video.

Deleted bool

Indicates that the video resource was deleted.

Object VideoDeleted

The object type that signals the deletion response.

Delete video

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\n", video.ID)
}
{
  "id": "id",
  "deleted": true,
  "object": "video.deleted"
}
Returns Examples
{
  "id": "id",
  "deleted": true,
  "object": "video.deleted"
}