Skip to content

Retrieve video content

client.videos.downloadContent(stringvideoID, VideoDownloadContentParams { variant } query?, RequestOptionsoptions?): Response
GET/videos/{video_id}/content

Download video content

ParametersExpand Collapse
videoID: string
query: VideoDownloadContentParams { variant }
variant?: "video" | "thumbnail" | "spritesheet"

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

Accepts one of the following:
"video"
"thumbnail"
"spritesheet"
ReturnsExpand Collapse
unnamed_schema_3 = Response

Retrieve video content

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});

const response = await client.videos.downloadContent('video_123');

console.log(response);

const content = await response.blob();
console.log(content);
Returns Examples