For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sample appsIntegrationsDiscordPlaygroundDevEx repo
GuidesSDK ReferenceAPI Reference
GuidesSDK ReferenceAPI Reference
  • TwelveLabs API
    • Introduction
    • Authentication
  • API Reference
    • Manage indexes
    • Upload content
    • Index content
      • POSTIndex an asset
      • GETRetrieve an indexed asset
      • GETList indexed assets
      • DELDelete an indexed asset
      • PATCHPartial update indexed asset
      • GETList indexed assets for an asset
    • Manage videos
    • Manage entities
    • Any-to-video search
    • Create embeddings v2
    • Create embeddings v1
    • Analyze and segment videos
    • Error codes
LogoLogo
Sample appsIntegrationsDiscordPlaygroundDevEx repo
API ReferenceIndex content

Index an asset

POST
https://api.twelvelabs.io/v1.3/indexes/:index-id/indexed-assets
POST
/v1.3/indexes/:index-id/indexed-assets
$curl -X POST https://api.twelvelabs.io/v1.3/indexes/6298d673f1090f1100476d4c/indexed-assets \
> -H "x-api-key: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "asset_id": "6298d673f1090f1100476d4c"
>}'
1{
2 "_id": "629b643b6f5f3c2cb871fd89",
3 "asset_id": "6298d673f1090f1100476d4c"
4}
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: - **Search**: [Marengo requirements](/v1.3/docs/concepts/models/marengo#video-file-requirements) - **Video analysis**: [Pegasus requirements](/v1.3/docs/concepts/models/pegasus#input-requirements). If you want to both search and analyze your videos, the most restrictive requirements apply. <Note title="Note"> This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page. </Note>
Was this page helpful?
Previous

Retrieve an indexed asset

Next
Built with

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:

  • Search: Marengo requirements
  • Video analysis: Pegasus requirements.

If you want to both search and analyze your videos, the most restrictive requirements apply.

Note

This endpoint is rate-limited. For details, see the Rate limits page.

Authentication

x-api-keystring

Your API key.

Note

You can find your API key on the API Keys page.

Path parameters

index-idstringRequired
The unique identifier of the index to which the asset will be indexed.

Request

This endpoint expects an object.
asset_idstringRequired

The unique identifier of the asset to index. The asset status must be ready. Use the Retrieve an asset method to check the status.

enable_video_streambooleanOptionalDefaults to false

This parameter indicates if the platform stores the video for streaming. When set to true, the platform stores the video, and you can retrieve its URL by calling the GET method of the /indexes/{index-id}/indexed-assets/{indexed-asset-id} endpoint. You can then use this URL to access the stream over the HLS protocol.

user_metadatamap from strings to anyOptional

Metadata that helps you categorize your assets. You can specify a list of keys and values. Keys must be of type string, and values can be of the following types: string, integer, float, or boolean.

Response

The indexing request has been accepted and is processing.
_idstring
The unique identifier of the indexed asset. Use it to monitor the indexing progress.
asset_idstring
The unique identifier of the associated asset.

Errors

400
Bad Request Error
404
Not Found Error
500
Internal Server Error