Twelve Labs

App · 20 actions

Upload and index video, generate embeddings, and run asynchronous video analysis.

Actions

ActionWhat it does
Create an indexCreate an index.
Create embeddingsCreate embeddings.
Delete a media assetDelete a media asset.
Delete an indexDelete an index.
Delete an indexed assetDelete an indexed asset.
Get a media assetGet a media asset.
Get a video analysis taskGet a video analysis task.
Get an asset transcriptGet an asset transcript.
Get an embedding taskGet an embedding task.
Get an indexGet an index.
Get an indexed assetGet an indexed asset.
Index a media assetIndex a media asset.
List indexed assetsList indexed assets.
List indexesList indexes.
List media assetsList media assets.
List video analysis tasksList video analysis tasks.
Rename an indexRename an index.
Start a video analysis taskStart a video analysis task.
Update asset metadataUpdate asset metadata.
Upload a media assetUpload a media asset.

Create an index

Create an index.

Inputs

Index nameindex_nametextRequired
The name of the index. Make sure you use a succinct and descriptive name.
ModelsmodelslistRequired
An array that specifies the [video understanding models](/v1.3/docs/concepts/models) and the [model options](/v1.3/docs/concepts/modalities#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.
Addonsaddonslist
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.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "_id": "example"
  }
}

Create embeddings

Create embeddings.

Inputs

Input typeinput_typetextRequired
Input type.One of: text, image, text_image (Text image), audio, video, multi_input (Multi input).
Model namemodel_nametextRequired
The embedding model to use. **Values**: - `marengo3.5`: For details about this version, see the [Marengo 3.5](/v1.3/docs/concepts/models/marengo/marengo-3-5) page. - `marengo3.0`: For details about this version, see the [Marengo 3.0](/v1.3/docs/concepts/models/marengo/marengo-3-0) page.One of: marengo3.0, marengo3.5.
Auto truncateauto_truncatetrue/false
Auto truncate.
Embedding uncertaintyembedding_uncertaintytrue/false
Embedding uncertainty.
Embedding dimensionembedding_dimensiontext
Embedding dimension.One of: 128, 256, 512.
Texttextobject
This field is required if the `input_type` parameter is `text`.
Imageimageobject
This field is required if the `input_type` parameter is `image`. Requires Marengo 3.0. The decoded file can be up to 32 MB.
Text imagetext_imageobject
This field is required if the `input_type` parameter is `text_image`. Requires Marengo 3.0. The decoded file can be up to 32 MB.
Audioaudioobject
This field is required if the `input_type` parameter is `audio`. Requires Marengo 3.0. The decoded file can be up to 36 MB.
Videovideoobject
This field is required if the `input_type` parameter is `video`. Requires Marengo 3.0. The decoded file can be up to 36 MB.
Multi inputmulti_inputobject
Multi input.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "data": [
      {
        "chunk_index": 1,
        "embedding": [
          1
        ],
        "embedding_option": "visual",
        "embedding_scope": "clip",
        "embedding_uncertainty": [
          1
        ],
        "end_page_number": 1,
        "end_sec": 1,
        "quadrant": "top_left",
        "start_page_number": 1,
        "start_sec": 1
      }
    ],
    "metadata": {
      "clip_length": 1,
      "duration": 1,
      "embedding_dimension": 1,
      "embedding_options": [
        "example"
      ],
      "embedding_scopes": [
        "clip"
      ],
      "end_offset_sec": 1,
      "input_filename": "example",
      "input_type": "image",
      "input_url": "example",
      "start_offset_sec": 1
    },
    "usage": {
      "input_tokens": {},
      "truncated": true,
      "truncation_reason": "model_context_window"
    }
  }
}

Delete a media asset

Delete a media asset.

Inputs

Assetasset_idtextRequired
The unique identifier of the asset to delete.
Forceforcetrue/false
Force.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {}
}

Delete an index

Delete an index.

Inputs

Indexindex_idtextRequired
Unique identifier of the index to delete.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {}
}

Delete an indexed asset

Delete an indexed asset.

Inputs

Indexindex_idtextRequired
The unique identifier of the index to which the indexed asset has been uploaded.
Indexed assetindexed_asset_idtextRequired
The unique identifier of the indexed asset to delete.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {}
}

Get a media asset

Get a media asset.

Inputs

Assetasset_idtextRequired
The unique identifier of the asset to retrieve.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "_id": "example",
    "created_at": "example",
    "duration": 1,
    "error": {
      "message": "example"
    },
    "file_type": "example",
    "filename": "example",
    "hls": {
      "manifest_url": "example",
      "status": "pending"
    },
    "method": "direct",
    "size": 1,
    "source": {
      "details": {
        "original_filename": "example",
        "provider": "google_drive",
        "source_id": "example",
        "source_link": "example"
      },
      "type": "connector"
    },
    "status": "failed",
    "technical_metadata": {
      "audio_channels": 1,
      "audio_codec": "example",
      "audio_duration_seconds": 1,
      "audio_sample_rate": 1,
      "audio_streams": [
        {
          "bit_depth": 1,
          "bitrate_bps": 1,
          "channel_layout": "example",
          "channels": 1,
          "codec": "example",
          "codec_long": "example",
          "duration_seconds": 1,
          "index": 1,
          "language": "example",
          "sample_rate": 1
        }
      ],
      "container_creation_time": "example",
      "document_author": "example",
      "document_creation_date": "example",
      "document_creator_tool": "example",
      "document_is_encrypted": true,
      "document_is_tagged": true,
      "document_keywords": "example",
      "document_language": "example",
      "document_modification_date": "example",
      "document_page_count": 1,
      "document_page_height_pt": 1,
      "document_page_width_pt": 1,
      "document_pdf_version": "example",
      "document_producer": "example",
      "document_subject": "example",
      "document_title": "example",
      "drop_frame": true,
      "file_container_format": "example",
      "file_mime_type": "example",
      "file_size_bytes": 1,
      "geospatial_altitude_meters": 1,
      "geospatial_latitude": 1,
      "geospatial_longitude": 1,
      "has_alpha": true,
      "has_audio": true,
      "image_bit_depth": 1,
      "image_color_space": "example",
      "image_format": "example",
      "image_height": 1,
      "image_orientation": 1,
      "image_width": 1,
      "is_animated": true,
      "is_hdr": true,
      "start_timecode": "example",
      "storage_aspect_ratio": 1,
      "timecode_source": "example",
      "total_audio_streams": 1,
      "total_video_streams": 1,
      "video_bitrate_bps": 1,
      "video_codec": "example",
      "video_duration_seconds": 1,
      "video_fps": 1,
      "video_height": 1,
      "video_streams": [
        {
          "avg_fps": 1,
          "bit_depth": 1,
          "bitrate_bps": 1,
          "codec": "example",
          "color_primaries": "example",
          "color_range": "example",
          "color_space": "example",
          "color_transfer": "example",
          "display_aspect_ratio": "example",
          "duration_seconds": 1,
          "fps": 1,
          "height": 1,
          "index": 1,
          "pixel_aspect_ratio": "example",
          "pixel_format": "example",
          "rotation": 1,
          "scan_type": "example",
          "width": 1
        }
      ],
      "video_width": 1
    },
    "thumbnail": {
      "representative_url": "example",
      "status": "pending"
    },
    "user_metadata": {}
  }
}

Get a video analysis task

Get a video analysis task.

Inputs

Tasktask_idtextRequired
The unique identifier of the analysis task.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "batch_id": "example",
    "completed_at": "example",
    "created_at": "example",
    "custom_id": "example",
    "error": {
      "code": "example",
      "message": "example"
    },
    "request_params": {
      "analysis_mode": "general",
      "end_time": 1,
      "image": [
        {
          "asset_id": "example",
          "media_type": "example",
          "name": "example",
          "url": "example"
        }
      ],
      "max_segment_duration": 1,
      "max_tokens": "example",
      "min_segment_duration": 1,
      "prompt": "example",
      "prompt_v2": {
        "input_text": "example",
        "media_sources": [
          {}
        ]
      },
      "response_format": {
        "json_schema": {},
        "segment_definitions": [
          {}
        ],
        "segment_time_format": "seconds",
        "type": "json_schema"
      },
      "start_time": 1,
      "temperature": 1
    },
    "result": {
      "data": "example",
      "finish_reason": "stop",
      "generation_id": "example",
      "usage": {
        "input_tokens": 1,
        "output_tokens": 1
      }
    },
    "status": "queued",
    "task_id": "example",
    "video_source": {
      "asset_id": "example",
      "index_id": "example",
      "system_metadata": {
        "duration": 1
      },
      "type": "url",
      "url": "example",
      "video_id": "example"
    },
    "webhooks": [
      {
        "attempts": 1,
        "delivered": true,
        "last_error": "example",
        "url": "example"
      }
    ]
  }
}

Get an asset transcript

Get an asset transcript.

Inputs

Assetasset_idtextRequired
The unique identifier of the asset.
Includeincludelist
Include.One or more of: words, sentences, utterances.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "error": {
      "message": "example"
    },
    "sentences": [
      {
        "end": 1,
        "start": 1,
        "value": "example"
      }
    ],
    "status": "pending",
    "utterances": [
      {
        "end": 1,
        "speaker": "example",
        "start": 1,
        "value": "example"
      }
    ],
    "words": [
      {
        "end": 1,
        "start": 1,
        "value": "example"
      }
    ]
  }
}

Get an embedding task

Get an embedding task.

Inputs

Task IDtask_idtextRequired
The unique identifier of the embedding task.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "_id": "example",
    "created_at": "example",
    "data": [
      {
        "chunk_index": 1,
        "embedding": [
          1
        ],
        "embedding_option": "visual",
        "embedding_scope": "clip",
        "embedding_uncertainty": [
          1
        ],
        "end_page_number": 1,
        "end_sec": 1,
        "quadrant": "top_left",
        "start_page_number": 1,
        "start_sec": 1
      }
    ],
    "error": {
      "message": "example"
    },
    "metadata": {
      "clip_length": 1,
      "duration": 1,
      "embedding_dimension": 1,
      "embedding_options": [
        "example"
      ],
      "embedding_scopes": [
        "asset"
      ],
      "end_offset_sec": 1,
      "input_filename": "example",
      "input_type": "audio",
      "input_url": "example",
      "start_offset_sec": 1
    },
    "status": "processing",
    "updated_at": "example",
    "usage": {
      "input_tokens": {},
      "truncated": true,
      "truncation_reason": "model_context_window"
    }
  }
}

Get an index

Get an index.

Inputs

Indexindex_idtextRequired
Unique identifier of the index to retrieve.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "_id": "example",
    "addons": [
      "example"
    ],
    "created_at": "example",
    "expires_at": "example",
    "index_name": "example",
    "models": [
      {
        "model_name": "example",
        "model_options": [
          "example"
        ]
      }
    ],
    "total_duration": 1,
    "updated_at": "example",
    "video_count": 1
  }
}

Get an indexed asset

Get an indexed asset.

Inputs

Indexindex_idtextRequired
The unique identifier of the index to which the indexed asset has been uploaded.
Indexed assetindexed_asset_idtextRequired
The unique identifier of the indexed asset to retrieve.
Embedding optionembedding_optionlist
Specifies which types of embeddings to retrieve. Values: `visual`, `audio`, `transcription`. For details, see the [Embedding options](/v1.3/docs/concepts/modalities#embedding-options) section.One or more of: visual, audio, transcription, visual-text.
Transcriptiontranscriptiontrue/false
Specifies whether to retrieve a transcription of the spoken words.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "_id": "example",
    "asset_id": "example",
    "created_at": "example",
    "embedding": {
      "model_name": "example",
      "video_embedding": {
        "segments": [
          {}
        ]
      }
    },
    "hls": {
      "status": "PROCESSING",
      "thumbnail_urls": [
        "example"
      ],
      "updated_at": "example",
      "video_url": "example"
    },
    "indexed_at": "example",
    "status": "ready",
    "system_metadata": {
      "duration": 1,
      "filename": "example",
      "fps": 1,
      "height": 1,
      "size": 1,
      "width": 1
    },
    "transcription": [
      {
        "end": 1,
        "start": 1,
        "value": "example"
      }
    ],
    "updated_at": "example",
    "user_metadata": {}
  }
}

Index a media asset

Index a media asset.

Inputs

Indexindex_idtextRequired
The unique identifier of the index to which the asset will be indexed.
Assetasset_idtextRequired
Asset id.
Enable video streamenable_video_streamtrue/false
Enable video stream.
User metadatauser_metadataobject
User metadata.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "_id": "example",
    "asset_id": "example"
  }
}

List indexed assets

List indexed assets.

Inputs

Indexindex_idtextRequired
The unique identifier of the index for which the platform will retrieve the indexed assets.
Pagepagenumber
A number that identifies the page to retrieve. **Default**: `1`.
Page limitpage_limitnumber
The number of items to return on each page. **Default**: `10`. **Max**: `50`.
Sort bysort_bytext
The field to sort on. The following options are available: - `updated_at`: Sorts by the time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"), when the item was updated. - `created_at`: Sorts by the time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"), when the item was created. **Default**: `created_at`.
Sort optionsort_optiontext
The sorting direction. The following options are available: - `asc` - `desc` **Default**: `desc`.
Statusstatuslist
Status.One or more of: ready, pending, queued, indexing, validating, failed.
Filenamefilenametext
Filter by filename.
Durationdurationobject
Filter by duration in seconds. Pass an object with `gte` and/or `lte` for range filtering. For exact match, set both to the same value.
Fpsfpsobject
Filter by frames per second. Pass an object with `gte` and/or `lte` for range filtering. For exact match, set both to the same value.
Widthwidthobject
Filter by width in pixels. Pass an object with `gte` and/or `lte` for range filtering. For exact match, set both to the same value.
Heightheightobject
Filter by height in pixels. Pass an object with `gte` and/or `lte` for range filtering. For exact match, set both to the same value.
Sizesizeobject
Filter by size in bytes. Pass an object with `gte` and/or `lte` for range filtering. For exact match, set both to the same value.
Created atcreated_attext
Filter indexed assets by the creation date and time of their associated indexing tasks, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"). The platform returns indexed assets created on or after the specified date and time.
Updated atupdated_attext
Updated at.
User metadatauser_metadataobject
User metadata.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "data": [
      {
        "_id": "example",
        "asset_id": "example",
        "created_at": "example",
        "indexed_at": "example",
        "status": "ready",
        "system_metadata": {
          "duration": 1,
          "filename": "example",
          "fps": 1,
          "height": 1,
          "size": 1,
          "width": 1
        },
        "updated_at": "example"
      }
    ],
    "page_info": {
      "limit_per_page": 1,
      "page": 1,
      "total_page": 1,
      "total_results": 1
    }
  }
}

List indexes

List indexes.

Inputs

Pagepagenumber
A number that identifies the page to retrieve. **Default**: `1`.
Page limitpage_limitnumber
The number of items to return on each page. **Default**: `10`. **Max**: `50`.
Sort bysort_bytext
The field to sort on. The following options are available: - `updated_at`: Sorts by the time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"), when the item was updated. - `created_at`: Sorts by the time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"), when the item was created. **Default**: `created_at`.
Sort optionsort_optiontext
The sorting direction. The following options are available: - `asc` - `desc` **Default**: `desc`.
Index nameindex_nametext
Filter by the name of an index.
Model optionsmodel_optionstext
Filter by the model options. When filtering by multiple model options, the values must be comma-separated.
Model familymodel_familytext
Filter by the model family. This parameter can take one of the following values: `marengo` or `pegasus`. You can specify a single value.
Created atcreated_attext
Filter indexes by the creation date and time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"). The platform returns the indexes that were created on the specified date at or after the given time.
Updated atupdated_attext
Filter indexes by the last update date and time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"). The platform returns the indexes that were last updated on the specified date at or after the given time.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "data": [
      {
        "_id": "example",
        "addons": [
          "example"
        ],
        "created_at": "example",
        "expires_at": "example",
        "index_name": "example",
        "models": [
          {}
        ],
        "total_duration": 1,
        "updated_at": "example",
        "video_count": 1
      }
    ],
    "page_info": {
      "limit_per_page": 1,
      "page": 1,
      "total_page": 1,
      "total_results": 1
    }
  }
}

List media assets

List media assets.

Inputs

Pagepagenumber
A number that identifies the page to retrieve. **Default**: `1`.
Page limitpage_limitnumber
The number of items to return on each page. **Default**: `10`. **Max**: `50`.
Asset IDSasset_idslist
Filters the response to include only assets with the specified identifiers. Provide one or more asset identifiers. When you specify multiple identifiers, the platform returns all matching assets.
Asset typesasset_typeslist
Filters the response to include only assets of the specified types. Provide one or more asset types. When you specify multiple types, the platform returns all matching assets.One or more of: image, video, audio, document.
Filenamefilenametext
Filters the response to include only assets whose filename contains the specified string. The match is case-insensitive and supports partial matching.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "data": [
      {
        "_id": "example",
        "created_at": "example",
        "duration": 1,
        "error": {
          "message": "example"
        },
        "file_type": "example",
        "filename": "example",
        "hls": {
          "manifest_url": "example",
          "status": "pending"
        },
        "method": "direct",
        "size": 1,
        "source": {
          "details": {},
          "type": "connector"
        },
        "status": "failed",
        "technical_metadata": {
          "audio_channels": 1,
          "audio_codec": "example",
          "audio_duration_seconds": 1,
          "audio_sample_rate": 1,
          "audio_streams": [
            {}
          ],
          "container_creation_time": "example",
          "document_author": "example",
          "document_creation_date": "example",
          "document_creator_tool": "example",
          "document_is_encrypted": true,
          "document_is_tagged": true,
          "document_keywords": "example",
          "document_language": "example",
          "document_modification_date": "example",
          "document_page_count": 1,
          "document_page_height_pt": 1,
          "document_page_width_pt": 1,
          "document_pdf_version": "example",
          "document_producer": "example",
          "document_subject": "example",
          "document_title": "example",
          "drop_frame": true,
          "file_container_format": "example",
          "file_mime_type": "example",
          "file_size_bytes": 1,
          "geospatial_altitude_meters": 1,
          "geospatial_latitude": 1,
          "geospatial_longitude": 1,
          "has_alpha": true,
          "has_audio": true,
          "image_bit_depth": 1,
          "image_color_space": "example",
          "image_format": "example",
          "image_height": 1,
          "image_orientation": 1,
          "image_width": 1,
          "is_animated": true,
          "is_hdr": true,
          "start_timecode": "example",
          "storage_aspect_ratio": 1,
          "timecode_source": "example",
          "total_audio_streams": 1,
          "total_video_streams": 1,
          "video_bitrate_bps": 1,
          "video_codec": "example",
          "video_duration_seconds": 1,
          "video_fps": 1,
          "video_height": 1,
          "video_streams": [
            {}
          ],
          "video_width": 1
        },
        "thumbnail": {
          "representative_url": "example",
          "status": "pending"
        },
        "user_metadata": {}
      }
    ],
    "page_info": {
      "limit_per_page": 1,
      "page": 1,
      "total_page": 1,
      "total_results": 1
    }
  }
}

List video analysis tasks

List video analysis tasks.

Inputs

Pagepagenumber
A number that identifies the page to retrieve. **Default**: `1`.
Page limitpage_limitnumber
The number of items to return on each page. **Default**: `10`. **Max**: `50`.
Statusstatustext
Filter analysis tasks by status. Possible values: `queued`, `pending`, `processing`, `ready`, `failed`, `canceled`.One of: queued, pending, processing, ready, failed, canceled.
Video URLvideo_urltext
Filter tasks by exact video source URL.
Assetasset_idtext
Filter tasks by asset ID.
Analysis modeanalysis_modetext
Filter tasks by the analysis mode used when creating the task.One of: general, time_based_metadata (Time based metadata).

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "data": [
      {
        "batch_id": "example",
        "completed_at": "example",
        "created_at": "example",
        "custom_id": "example",
        "error": {
          "code": "example",
          "message": "example"
        },
        "request_params": {
          "analysis_mode": "general",
          "end_time": 1,
          "image": [
            {}
          ],
          "max_segment_duration": 1,
          "max_tokens": "example",
          "min_segment_duration": 1,
          "prompt": "example",
          "prompt_v2": {},
          "response_format": {},
          "start_time": 1,
          "temperature": 1
        },
        "result": {
          "data": "example",
          "finish_reason": "stop",
          "generation_id": "example",
          "usage": {}
        },
        "status": "queued",
        "task_id": "example",
        "video_source": {
          "asset_id": "example",
          "index_id": "example",
          "system_metadata": {},
          "type": "url",
          "url": "example",
          "video_id": "example"
        },
        "webhooks": [
          {}
        ]
      }
    ],
    "page_info": {
      "limit_per_page": 1,
      "page": 1,
      "total_page": 1,
      "total_results": 1
    }
  }
}

Rename an index

Rename an index.

Inputs

Indexindex_idtextRequired
Unique identifier of the index to update.
Index nameindex_nametextRequired
The name of the index.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {}
}

Start a video analysis task

Start a video analysis task.

Inputs

Model namemodel_nametext
The video understanding model to use for analysis. - `pegasus1.6`: For details about this version, see the [Pegasus 1.6](/v1.3/docs/concepts/models/pegasus/pegasus-1-6) page. - `pegasus1.5`: For details about this version, see the [Pegasus 1.5](/v1.3/docs/concepts/models/pegasus/pegasus-1-5) page. **Default:** `pegasus1.5`.One of: pegasus1.6, pegasus1.5.
Videovideoobject
An object specifying the source of the video content. Include exactly one source. Mutually exclusive with the `image` parameter.
Promptprompttext
Prompt.
Analysis modeanalysis_modetext
Analysis mode.One of: general, time_based_metadata (Time based metadata).
Temperaturetemperaturenumber
Controls the randomness of the text output. **Default:** 0.2 **Min:** 0 **Max:** 1.
Response formatresponse_formatobject
Controls the response format. When you omit this parameter, you receive unstructured text. - `json_schema`: Return structured JSON that conforms to your schema. - `segment_definitions`: Extract timestamped metadata with custom fields from your video. Requires `analysis_mode` set to `time_based_metadata`.
Start timestart_timenumber
Start of the analysis window, as an absolute timestamp in seconds, based on the internal metadata of the video. Use with `end_time` to analyze only a portion of the video.
End timeend_timenumber
End of the analysis window, as an absolute timestamp in seconds, based on the internal metadata of the video. Use with `start_time` to analyze only a portion of the video.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "status": "queued",
    "task_id": "example"
  }
}

Update asset metadata

Update asset metadata.

Inputs

Assetasset_idtextRequired
The unique identifier of the asset whose user-defined metadata to update.
User metadatauser_metadataobjectRequired
User metadata.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {}
}

Upload a media asset

Upload a media asset.

Inputs

Filefiletext
Specify this parameter to upload a file from your local file system. This parameter is required when `method` is set to `direct`. Local video, audio, and documents support up to 200 MB. Images support up to 32 MB.
URLurltext
Url.
Filenamefilenametext
The filename of the asset. If you provide a filename, the platform preserves it. If you omit it, the platform determines one from the file or URL.
Enable hlsenable_hlstrue/false
The platform generates an HLS playlist and segments for streaming. Set to `false` to disable HLS generation. Applicable to video and audio assets only. The platform ignores this flag for other asset types. **Default**: `true`.
Enable thumbnailenable_thumbnailtrue/false
The platform generates thumbnail images from the uploaded content. Set to `false` to disable thumbnail generation. For PDF files, the platform generates a representative thumbnail from the first page. Text and Markdown files do not produce thumbnails; the platform ignores this flag for them. **Default**: `true`.

Outputs

dataobject
The response from Twelve Labs.
Example output
{
  "data": {
    "_id": "example",
    "created_at": "example",
    "file_type": "example",
    "filename": "example",
    "method": "direct",
    "source": {
      "details": {
        "original_filename": "example",
        "provider": "google_drive",
        "source_id": "example",
        "source_link": "example"
      },
      "type": "connector"
    },
    "status": "failed",
    "user_metadata": {}
  }
}

On this page