Classify a set of videos

Deprecated
POST
Deprecation notice

The Classify API has been deprecated on Feb 28, 2025.

Recommended alternative: Update to the 1.3 version of the API and use the Pegasus video understanding model to classify videos.

Resources: Migration guide > Use Pegasus to classify videos.

Use this method to classify a set of videos based on the entities or actions shown in those videos. Note that this endpoint returns the first page or results. To retrieve the rest of the pages, you must call the GET method of the /classify/{page_token} endpoint passing it the token that identifies the page you want to retrieve.

Notes
  • This endpoint is rate-limited. For details, see the Rate limits page.
  • The total number of the prompts you specify in a request must not exceed 100.
  • The total duration of the videos you classify in a request must not exceed 10 hours.
  • When you use pagination, you will not be charged for retrieving subsequent pages of results.

Request

This endpoint expects an object.
video_idslist of stringsRequired

An array containing the unique identifiers of the videos that you want to classify.

optionslist of enumsRequired
Allowed values: conversationtext_in_videovisual

An array that specifies the sources of information the platform uses when it categorizes a video. For details, see the Search options page.

conversation_optionenumRequired
Allowed values: semanticexact_match

Specifies the type of match the platform will perform. The following values are supported: semantic and exact_match. For details, see the Conversation option page.

Default: semantic

classeslist of objectsRequired

An array of objects containing the names and the definitions of entities or actions that the platform must identify.

page_limitintegerOptionalDefaults to 10

The number of items to return on each page.

Default: 10 Min: 1 Max: 50

include_clipsbooleanOptional

When this parameter is set to true, the platform will return detailed information about each matching video clip.

Default: false

thresholdobjectOptional

An object that allows you to filter the results.

show_detailed_scorebooleanOptionalDefaults to false

Set this parameter to true to specify that the platform should return a detailed score for each matching video clip. A detailed score contains the following information:

  • Maximum score: Represents the maximum score. It is determined by comparing the confidence scores of each matching clip and selecting the highest one.
  • Average score: Represents the average score of the matching video clips.
  • Normalized score: Represents the probability distribution of classes in the results, determined using the Softmax function.

Response

The specified videos have successfully been classified.

datalist of objectsOptional

An array that contains the response. Each element of the array contains information about a specific video.

page_infoobjectOptional

Errors

Built with