SpyBara
Go Premium

go/resources/videos/methods/download_content/index.md 2026-07-07 08:02 UTC to 2026-07-09 20:58 UTC

This page contains 86 additions and 0 deletions.

2026
Thu 9 20:58 Sun 12 06:58

Retrieve video content

client.Videos.DownloadContent(ctx, videoID, query) (*Response, error)

get /videos/{video_id}/content

Retrieve video content

Parameters

  • videoID string

  • query VideoDownloadContentParams

    • Variant param.Field[VideoDownloadContentParamsVariant]

      Which downloadable asset to return. Defaults to the MP4 video.

      • const VideoDownloadContentParamsVariantVideo VideoDownloadContentParamsVariant = "video"

      • const VideoDownloadContentParamsVariantThumbnail VideoDownloadContentParamsVariant = "thumbnail"

      • const VideoDownloadContentParamsVariantSpritesheet VideoDownloadContentParamsVariant = "spritesheet"

Returns

  • type VideoDownloadContentResponse interface{…}

Example

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"),
  )
  response, err := client.Videos.DownloadContent(
    context.TODO(),
    "video_123",
    openai.VideoDownloadContentParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}

Example

package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
)

func main() {
  client := openai.NewClient()
  response, err := client.Videos.DownloadContent(
    context.TODO(),
    "video_123",
    openai.VideoDownloadContentParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}