Summaries, chapters, or highlights

POST

This endpoint generates summaries, chapters, or highlights for your videos. Optionally, you can provide a prompt to customize the output.

Note

This endpoint is rate-limited. For details, see the Rate limits page.

Request

This endpoint expects an object.
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.

Notes
  • Your prompts can be instructive or descriptive, or you can also phrase them as questions.
  • The maximum length of a prompt is 375 tokens.

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

The specified video has successfully been summarized.

Summaryobject or null

When the value of the type parameter is set to summary, the response is as follows:

OR
Chapterobject or null

When the value of the type parameter is set to chapter, the response is as follows:

OR
Highlightobject or null

When the value of the type parameter is set to highlight, the response is as follows:

Errors

Built with