Summaries, chapters, or highlights

This endpoint analyzes videos and generates summaries, chapters, or highlights. Optionally, you can provide a prompt to customize the output. <Note title="Note"> This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page. </Note>

Headers

x-api-keystringRequired

Request

Request to generate a summary of a video.
video_idstringRequired
The unique identifier of the video that you want to summarize.
typestringRequired
Specifies the type of summary. Use one of the following values: - `summary`: A brief that encapsulates the key points of a video, presenting the most important information clearly and concisely. - `chapter`: A chronological list of all the chapters in a video, providing a granular breakdown of its content. For each chapter, the platform returns its starting and end times, measured in seconds from the beginning of the video clip, a descriptive headline that offers a brief of the events or activities within that part of the video, and an accompanying summary that elaborates on the headline. - `highlight`: A chronologically ordered list of the most important events within a video. Unlike chapters, highlights only capture the key moments, providing a snapshot of the video's main topics. For each highlight, the platform returns its starting and end times, measured in seconds from the beginning of the video, a title, and a brief description that captures the essence of this part of the video.
promptstringOptional
Use this field to provide context for the summarization task, such as the target audience, style, tone of voice, and purpose. <Note title="Notes"> - Your prompts can be instructive or descriptive, or you can also phrase them as questions. - The maximum length of a prompt is 2,000 tokens. </Note> **Example**: Generate a summary of this video for a social media post, up to two sentences.
temperaturedoubleOptional

Controls the randomness of the text output generated by the model. A higher value generates more creative text, while a lower value produces more deterministic text output.

Default: 0.2 Min: 0 Max: 1

response_formatobjectOptional

Use this parameter to specify the format of the response. This parameter is only valid when the type parameter is set to summary. If you omit this parameter, the platform returns unstructured text.

max_tokensintegerOptional<=4096
The maximum number of tokens to generate.

Response

The specified video has successfully been summarized.
summaryobject
OR
chapterobject
OR
highlightobject

Errors