Classify all the videos in an index

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 all the videos in the specified index 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 prompts you specify in a request must not exceed 100.
  • When you use pagination, you will not be charged for retrieving subsequent pages of results.

Request

This endpoint expects an object.
index_idstringRequired

The unique identifier of the index 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

thresholdintegerOptional

Use this parameter to filter on the level of confidence that the results match your prompts.

Min: 0 Max: 100 Default: 75

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.
  • Duration weighted score: Represents the score of each matching video clip, weighted by its length.
  • Normalized score: Represents the probability distribution of classes in the results, determined using the Softmax function.

Response

The videos in the specified index have successfully been classified.

datalist of objectsOptional

An array that contains the response.

page_infoobjectOptional

Errors

Built with