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

List indexed assets

GET
https://api.twelvelabs.io/v1.3/indexes/:index-id/indexed-assets
GET
/v1.3/indexes/:index-id/indexed-assets
$curl -G https://api.twelvelabs.io/v1.3/indexes/6298d673f1090f1100476d4c/indexed-assets \
> -H "x-api-key: <apiKey>" \
> -d filename=01.mp4 \
> -d "duration[gte]=10" \
> -d "duration[lte]=10" \
> -d "fps[gte]=25" \
> -d "fps[lte]=25" \
> -d "width[gte]=1920" \
> -d "width[lte]=1920" \
> -d "height[gte]=1080" \
> -d "height[lte]=1080" \
> -d "size[gte]=1048576" \
> -d "size[lte]=1048576" \
> --data-urlencode created_at=2024-08-16T16:53:59Z \
> --data-urlencode updated_at=2024-08-16T16:53:59Z
1{
2 "data": [
3 {
4 "_id": "62a17bf847f5678267ec10cc",
5 "asset_id": "6298d673f1090f1100476d4c",
6 "created_at": "2022-06-09T04:50:00.879Z",
7 "updated_at": "2022-06-09T04:55:57.256Z",
8 "status": "ready",
9 "system_metadata": {
10 "filename": "01.mp4",
11 "duration": 531.998133,
12 "width": 854,
13 "height": 400
14 }
15 },
16 {
17 "_id": "62a17bce47f5678267ec10c6",
18 "created_at": "2022-06-09T04:49:20.001Z",
19 "updated_at": "2022-06-09T04:54:10.345Z",
20 "status": "ready",
21 "system_metadata": {
22 "filename": "02.mp4",
23 "duration": 741.875,
24 "width": 854,
25 "height": 480
26 }
27 }
28 ],
29 "page_info": {
30 "limit_per_page": 10,
31 "page": 1,
32 "total_page": 1,
33 "total_results": 2
34 }
35}
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.
Was this page helpful?
Previous

Delete an indexed asset

Next
Built with

Authentication

x-api-keystring
Your API key. <Note title="Note"> You can find your API key on the <a href="https://playground.twelvelabs.io/dashboard/api-keys" target="_blank">API Keys</a> page. </Note>

Path parameters

index-idstringRequired
The unique identifier of the index for which the platform will retrieve the indexed assets.

Query parameters

pageintegerOptionalDefaults to 1

A number that identifies the page to retrieve.

Default: 1.

page_limitintegerOptionalDefaults to 10

The number of items to return on each page.

Default: 10. Max: 50.

sort_bystringOptionalDefaults to created_at
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_optionstringOptionalDefaults to desc
The sorting direction. The following options are available: - `asc` - `desc` **Default**: `desc`.
statuslist of enumsOptional
Filter by one or more indexing task statuses. The following options are available: - `ready`: The indexed asset has been successfully uploaded and indexed. - `pending`: The indexed asset is pending. - `queued`: The indexed asset is queued. - `indexing`: The indexed asset is being indexed. - `failed`: The indexed asset indexing task failed. To filter by multiple statuses, specify the `status` parameter for each value: ``` status=ready&status=validating ```
Allowed values:
filenamestringOptional
Filter by filename.
durationobjectOptional

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.

fpsobjectOptional

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.

widthobjectOptional

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.

heightobjectOptional

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.

sizeobjectOptional

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_atstringOptional

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_atstringOptional
This filter applies only to indexed assets updated using the [`PUT`](/v1.3/api-reference/videos/update) method of the `/indexes/{index-id}/indexed-assets/{indexed-asset-id}` endpoint. It filters indexed assets by the last update date and time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"). The platform returns the indexed assets that were last updated on the specified date at or after the given time.
user_metadatamap from strings to strings or doubles or booleansOptional
To enable filtering by custom fields, you must first add user-defined metadata to your video by calling the [`PUT`](/v1.3/api-reference/videos/update) method of the `/indexes/:index-id/indexed-assets/:indexed-asset-id` endpoint. Examples: - To filter on a string: `?category=recentlyAdded` - To filter on an integer: `?batchNumber=5` - To filter on a float: `?rating=9.3` - To filter on a boolean: `?needsReview=true`

Response

The indexed assets in the specified index have successfully been retrieved.
datalist of objects

An array that contains up to page_limit indexed assets.

page_infoobject
An object that provides information about pagination.

Errors

400
Bad Request Error

Your API key.

Note

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

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.

The sorting direction. The following options are available:

  • asc
  • desc

Default: desc.

Filter by one or more indexing task statuses. The following options are available:

  • ready: The indexed asset has been successfully uploaded and indexed.
  • pending: The indexed asset is pending.
  • queued: The indexed asset is queued.
  • indexing: The indexed asset is being indexed.
  • failed: The indexed asset indexing task failed.

To filter by multiple statuses, specify the status parameter for each value:

status=ready&status=validating

This filter applies only to indexed assets updated using the PUT method of the /indexes/{index-id}/indexed-assets/{indexed-asset-id} endpoint. It filters indexed assets by the last update date and time, in the RFC 3339 format (“YYYY-MM-DDTHH:mm:ssZ”). The platform returns the indexed assets that were last updated on the specified date at or after the given time.

To enable filtering by custom fields, you must first add user-defined metadata to your video by calling the PUT method of the /indexes/:index-id/indexed-assets/:indexed-asset-id endpoint.

Examples:

  • To filter on a string: ?category=recentlyAdded
  • To filter on an integer: ?batchNumber=5
  • To filter on a float: ?rating=9.3
  • To filter on a boolean: ?needsReview=true