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
      • The index object
      • POSTCreate an index
      • GETList indexes
      • GETRetrieve an index
      • PUTUpdate an index
      • DELDelete an index
    • Upload content
    • Index content
    • 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 ReferenceManage indexes

Create an index

POST
https://api.twelvelabs.io/v1.3/indexes
POST
/v1.3/indexes
$curl -X POST https://api.twelvelabs.io/v1.3/indexes \
> -H "x-api-key: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "index_name": "myIndex",
> "models": [
> {
> "model_name": "marengo3.0",
> "model_options": [
> "visual",
> "audio"
> ]
> },
> {
> "model_name": "pegasus1.2",
> "model_options": [
> "visual",
> "audio"
> ]
> }
> ],
> "addons": [
> "thumbnail"
> ]
>}'
1{
2 "_id": "62d85fe7340fa665f1fda5dd"
3}
This method creates an index.
Was this page helpful?
Previous

List indexes

Next
Built with

Authentication

x-api-keystring

Your API key.

Note

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

Request

Request to create an index.
index_namestringRequired
The name of the index. Make sure you use a succinct and descriptive name.
modelslist of objectsRequired

An array that specifies the video understanding models and the model options to be enabled for this index. Models determine what tasks you can perform with your videos. Model options determine which modalities the platform analyzes.

addonslist of stringsOptional

An array specifying which add-ons should be enabled. Each entry in the array is an addon, and the following values are supported:

  • thumbnail: Enables thumbnail generation.

If you don’t provide this parameter, no add-ons will be enabled.

Notes
  • You can only enable addons when using the Marengo video understanding model.
  • You cannot disable an add-on once the index has been created.

Response

An index has successfully been created
_idstring

Represents the unique identifier of the index object.

Errors

400
Bad Request Error