🌍 Global Mirror — Visit original CN site →
Skip to content
Primary navigation

Delete video

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

Permanently delete a completed or failed video and its stored assets.

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"
)

func main() {
  client := openai.NewClient()
  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"
}