# Twelve Labs

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

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/twelve-labs

## Actions

### Create an index

Create an index.

**Inputs**

- Index name (`index_name`, text, required): The name of the index. Make sure you use a succinct and descriptive name.
- Models (`models`, list, required): 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.
- Addons (`addons`, list): 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**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "data": {
    "_id": "example"
  }
}
```

### Create embeddings

Create embeddings.

**Inputs**

- Input type (`input_type`, text, required): Input type. One of: `text`, `image`, `text_image` (Text image), `audio`, `video`, `multi_input` (Multi input).
- Model name (`model_name`, text, required): 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 truncate (`auto_truncate`, true/false): Auto truncate.
- Embedding uncertainty (`embedding_uncertainty`, true/false): Embedding uncertainty.
- Embedding dimension (`embedding_dimension`, text): Embedding dimension. One of: `128`, `256`, `512`.
- Text (`text`, object): This field is required if the `input_type` parameter is `text`.
- Image (`image`, object): 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 image (`text_image`, object): 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.
- Audio (`audio`, object): This field is required if the `input_type` parameter is `audio`. Requires Marengo 3.0. The decoded file can be up to 36 MB.
- Video (`video`, object): 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 input (`multi_input`, object): Multi input.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "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**

- Asset (`asset_id`, text, required): The unique identifier of the asset to delete.
- Force (`force`, true/false): Force.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "data": {}
}
```

### Delete an index

Delete an index.

**Inputs**

- Index (`index_id`, text, required): Unique identifier of the index to delete.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "data": {}
}
```

### Delete an indexed asset

Delete an indexed asset.

**Inputs**

- Index (`index_id`, text, required): The unique identifier of the index to which the indexed asset has been uploaded.
- Indexed asset (`indexed_asset_id`, text, required): The unique identifier of the indexed asset to delete.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "data": {}
}
```

### Get a media asset

Get a media asset.

**Inputs**

- Asset (`asset_id`, text, required): The unique identifier of the asset to retrieve.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "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**

- Task (`task_id`, text, required): The unique identifier of the analysis task.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "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**

- Asset (`asset_id`, text, required): The unique identifier of the asset.
- Include (`include`, list): Include. One or more of: `words`, `sentences`, `utterances`.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "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 ID (`task_id`, text, required): The unique identifier of the embedding task.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "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**

- Index (`index_id`, text, required): Unique identifier of the index to retrieve.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "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**

- Index (`index_id`, text, required): The unique identifier of the index to which the indexed asset has been uploaded.
- Indexed asset (`indexed_asset_id`, text, required): The unique identifier of the indexed asset to retrieve.
- Embedding option (`embedding_option`, list): 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`.
- Transcription (`transcription`, true/false): Specifies whether to retrieve a transcription of the spoken words.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "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**

- Index (`index_id`, text, required): The unique identifier of the index to which the asset will be indexed.
- Asset (`asset_id`, text, required): Asset id.
- Enable video stream (`enable_video_stream`, true/false): Enable video stream.
- User metadata (`user_metadata`, object): User metadata.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "asset_id": "example"
  }
}
```

### List indexed assets

List indexed assets.

**Inputs**

- Index (`index_id`, text, required): The unique identifier of the index for which the platform will retrieve the indexed assets.
- Page (`page`, number): A number that identifies the page to retrieve. **Default**: `1`.
- Page limit (`page_limit`, number): The number of items to return on each page. **Default**: `10`. **Max**: `50`.
- Sort by (`sort_by`, text): 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 option (`sort_option`, text): The sorting direction. The following options are available: - `asc` - `desc` **Default**: `desc`.
- Status (`status`, list): Status. One or more of: `ready`, `pending`, `queued`, `indexing`, `validating`, `failed`.
- Filename (`filename`, text): Filter by filename.
- Duration (`duration`, object): 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.
- Fps (`fps`, object): 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.
- Width (`width`, object): 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.
- Height (`height`, object): 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.
- Size (`size`, object): 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 at (`created_at`, text): 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 at (`updated_at`, text): Updated at.
- User metadata (`user_metadata`, object): User metadata.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "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**

- Page (`page`, number): A number that identifies the page to retrieve. **Default**: `1`.
- Page limit (`page_limit`, number): The number of items to return on each page. **Default**: `10`. **Max**: `50`.
- Sort by (`sort_by`, text): 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 option (`sort_option`, text): The sorting direction. The following options are available: - `asc` - `desc` **Default**: `desc`.
- Index name (`index_name`, text): Filter by the name of an index.
- Model options (`model_options`, text): Filter by the model options. When filtering by multiple model options, the values must be comma-separated.
- Model family (`model_family`, text): Filter by the model family. This parameter can take one of the following values: `marengo` or `pegasus`. You can specify a single value.
- Created at (`created_at`, text): 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 at (`updated_at`, text): 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**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "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**

- Page (`page`, number): A number that identifies the page to retrieve. **Default**: `1`.
- Page limit (`page_limit`, number): The number of items to return on each page. **Default**: `10`. **Max**: `50`.
- Asset IDS (`asset_ids`, list): 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 types (`asset_types`, list): 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`.
- Filename (`filename`, text): Filters the response to include only assets whose filename contains the specified string. The match is case-insensitive and supports partial matching.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "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**

- Page (`page`, number): A number that identifies the page to retrieve. **Default**: `1`.
- Page limit (`page_limit`, number): The number of items to return on each page. **Default**: `10`. **Max**: `50`.
- Status (`status`, text): Filter analysis tasks by status. Possible values: `queued`, `pending`, `processing`, `ready`, `failed`, `canceled`. One of: `queued`, `pending`, `processing`, `ready`, `failed`, `canceled`.
- Video URL (`video_url`, text): Filter tasks by exact video source URL.
- Asset (`asset_id`, text): Filter tasks by asset ID.
- Analysis mode (`analysis_mode`, text): Filter tasks by the analysis mode used when creating the task. One of: `general`, `time_based_metadata` (Time based metadata).

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "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**

- Index (`index_id`, text, required): Unique identifier of the index to update.
- Index name (`index_name`, text, required): The name of the index.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "data": {}
}
```

### Start a video analysis task

Start a video analysis task.

**Inputs**

- Model name (`model_name`, text): 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`.
- Video (`video`, object): An object specifying the source of the video content. Include exactly one source. Mutually exclusive with the `image` parameter.
- Prompt (`prompt`, text): Prompt.
- Analysis mode (`analysis_mode`, text): Analysis mode. One of: `general`, `time_based_metadata` (Time based metadata).
- Temperature (`temperature`, number): Controls the randomness of the text output. **Default:** 0.2 **Min:** 0 **Max:** 1.
- Response format (`response_format`, object): 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 time (`start_time`, number): 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 time (`end_time`, number): 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**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "data": {
    "status": "queued",
    "task_id": "example"
  }
}
```

### Update asset metadata

Update asset metadata.

**Inputs**

- Asset (`asset_id`, text, required): The unique identifier of the asset whose user-defined metadata to update.
- User metadata (`user_metadata`, object, required): User metadata.

**Outputs**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "data": {}
}
```

### Upload a media asset

Upload a media asset.

**Inputs**

- File (`file`, text): 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.
- URL (`url`, text): Url.
- Filename (`filename`, text): 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 hls (`enable_hls`, true/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 thumbnail (`enable_thumbnail`, true/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**

- `data` (object): The response from Twelve Labs.

**Example output**

```json
{
  "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": {}
  }
}
```
