Classify
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.
The Resources.Classify
class provides methods to classify a set of videos or entire indexes.
Methods
Classify a set of videos
Description: This method classifies a set of videos based on the provided parameters and returns the first page of results.
Function signature and example:
Parameters:
The ClassifyVideosOptions
interface defines the parameters for classifying a set of videos:
The following properties are inherited from the ClassifyOptions
interface:
Return value: Returns a Promise
that resolves to an Models.ClassifyPageResult
object containing the classification results.
API Reference: For a description of each field in the request and response, see the Classify a set of videos page.
Related guides:
Classify all the videos within an index
Description: This method classifies all the videos within a specific index based on the provided parameters and returns the first page of results.
Function signature and example:
Parameters:
The ClassifyIndexOptions
interface defines the parameters for classifying a set of videos:
The following properties are inherited from the ClassifyOptions
interface:
Return value: Returns a Promise
that resolves to an Models.ClassifyPageResult
object containing the classification results.
API Reference: For a description of each field in the request and response, see the Classify all the videos within an index page.
Related guides:
Retrieve a specific page of results
Description: This method retrieves a specific page of results. This method provides direct pagination. Choose it mainly when the total number of items is manageable, or you must fetch a single page of results.
Function signature and example:
Parameters:
Return value: Returns a Promise
that resolves to an Models.ClassifyPageResult
object containing the classification results.
API Reference: For a description of each field in the request and response, see the Retrieve a specific page of results page.
Related guides:
Iterative pagination
If your application must retrieve a large number of items, use iterative pagination. To retrieve the first page of results, invoke the videos
or index
method of the classify
object. To retrieve subsequent pages of results, use the async iterator protocol.