The Indexes.IndexedAssets interface provides methods to manage indexed assets within an index.
Before you begin, create an index if you don’t have one.
Upload your content using direct or multipart uploads. The platform creates an asset and returns its unique identifier.
For URL uploads larger than 200 MB, check the asset status using the assets.retrieve method until status is ready before proceeding.
Index your content using the indexes.indexedAssets.create method.
Monitor the indexing status until it shows ready using the indexes.indexedAssets.retrieve method.
Description: This method indexes an uploaded asset to make it searchable and analyzable. Indexing processes your content and extracts information that enables the platform to search and analyze your videos.
This operation is asynchronous. The platform returns an indexed asset ID immediately and processes your content in the background. Monitor the indexing status to know when your content is ready to use.
Your asset must meet the requirements based on your workflow:
If you want to both search and analyze your videos, the most restrictive requirements apply.
This method is rate-limited. For details, see the Rate limits page.
Function signature and example:
The TwelvelabsApi.indexes.IndexedAssetsCreateRequest interface has the following properties:
Returns an HttpResponsePromise that resolves to a TwelvelabsApi.indexes.IndexedAssetsCreateResponse object containing the indexed asset details.
The TwelvelabsApi.indexes.IndexedAssetsCreateResponse interface contains the following properties:
Description: This method retrieves information about an indexed asset, including its status, metadata, and optional embeddings or transcription.
Use this method to:
Monitor the indexing progress:
status field until it shows readyRetrieve the asset metadata:
Retrieve the embeddings:
embeddingOption parameter to retrieve video embeddingsRetrieve transcriptions:
transcription parameter to true to retrieve spoken words from your videoThe TwelvelabsApi.indexes.IndexedAssetsRetrieveRequest interface has the following properties:
Return value: Returns an HttpResponsePromise that resolves to a TwelvelabsApi.IndexedAssetDetailed object containing detailed information about the indexed asset.
The TwelvelabsApi.IndexedAssetDetailed interface extends TwelvelabsApi.IndexedAsset and contains the following additional properties:
The IndexedAssetDetailed interface also inherits all properties from TwelvelabsApi.IndexedAsset:
The IndexedAssetSystemMetadata interface contains the following properties:
The HlsObject interface contains the following properties:
The TranscriptionDataItem interface contains the following properties:
Description: This method updates one or more fields of the metadata of an indexed asset. You can also delete a field by setting it to null.
Function signature and example:
Returns a Promise that resolves to void.
Description: This method returns a list of the indexed assets in the specified index. By default, the platform returns your indexed assets sorted by creation date, with the newest at the top of the list.
Function signature and example:
The TwelvelabsApi.indexes.IndexedAssetsListRequest interface has the following properties:
Returns a Promise that resolves to a Page<TwelvelabsApi.IndexedAsset> object that allows you to iterate through the paginated indexed asset results.
The Page<T> interface contains the following properties and methods:
The TwelvelabsApi.IndexedAsset interface contains the following properties:
Description: This method returns a list of indexed assets that reference the specified asset. Each entry includes the indexed asset ID and the index it belongs to.
Function signature and example:
The TwelvelabsApi.indexes.IndexedAssetsListByAssetRequest interface has the following properties:
Returns a Promise that resolves to a Page<TwelvelabsApi.IndexedAssetSummary> object that allows you to iterate through the paginated results.
The Page<T> interface contains the following properties and methods:
The TwelvelabsApi.IndexedAssetSummary interface contains the following properties:
The TwelvelabsApi.IndexedAssetSummaryIndex interface contains the following properties:
List indexed assets for an asset
Description: This method deletes all the information about the specified indexed asset. This action cannot be undone.
Function signature and example:
Returns an HttpResponsePromise that resolves to void.