Skip to content

Retrieve video content

videos.download_content(strvideo_id, VideoDownloadContentParams**kwargs) -> BinaryResponseContent
GET/videos/{video_id}/content

Download video content

ParametersExpand Collapse
video_id: str
variant: Optional[Literal["video", "thumbnail", "spritesheet"]]

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

Accepts one of the following:
"video"
"thumbnail"
"spritesheet"
ReturnsExpand Collapse
BinaryResponseContent

Retrieve video content

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
response = client.videos.download_content(
    video_id="video_123",
)
print(response)
content = response.read()
print(content)
Returns Examples