Content classification is the process of organizing content into distinct categories based on specific criteria. This process helps you organize your videos into more manageable and useful categories, making them easier to find, access, and use.

If you have an extensive library of videos you'd like to analyze to identify specific actions or entities, manually finding the clips that meet your criteria is time-consuming. With a single API call, the Twelve Labs Video Understanding Platform automatically identifies the actions and entities you specify whenever they appear in your videos and assigns a likelihood score that indicates how likely those actions or entities are to occur in each of your videos.

The platform allows you to define either a simple or a hierarchical taxonomy system to organize your videos. A simple taxonomy system is composed of a single set of categories, similar to YouTube video categories. A hierarchical taxonomy system is composed of categories and subcategories, similar to IAB Tech Lab Content Taxonomy.

The following parameters allow you to control how classification works:

  • classes: An array of objects containing the names and definitions of the entities or actions that the platform must identify. Each object is composed of the following fields:
    • name: A string representing the name you want to give this class.
    • prompts: An array of strings that specifies what the class contains. The platform uses the values you provide in this array to classify your videos.

Example of using a simple taxonomy system:

{
	"classes": [
		{
			"name": "Film and Animation",
			"prompts": [
				"Film and Animation"
			]
		},
		{
			"name": "Autos and Vehicles",
			"prompts": [
				"Autos and Vehicles"
			]
		}
	]
}

Example of using a hierarchical taxonomy system:

{
	"classes": [
		{
			"name": "Attractions",
			"prompts": [
				"Amusement and Theme Parks",
				"Bars and Restaurants"
			]
		},
		{
			"name": "Education",
			"prompts": [
				"Primary Education",
				"Secondary Education"
			]
		}
	]
}

With Twelve Labs, you can either classify a set of videos or all the videos within an index. Depending on your use case, proceed to one of the following sections: