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 all the videos within an index.
Related quickstart notebook](https://colab.research.google.com/github/twelvelabs-io/twelvelabs-developer-experience/blob/main/quickstarts/TwelveLabs_Quickstart_Classify.ipynb)
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:
Return value: Returns a 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:
Return value: Returns a 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 models.ClassifyPageResult
object containing the classification results for the specified page.
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 index
or videos
methods of the classify
object. To retrieve subsequent pages of results, use the iterator protocol.