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
      • Direct uploads
        • POSTCreate an asset
        • GETRetrieve an asset
        • GETList assets
        • DELDelete an asset
        • PATCHUpdate the user-defined metadata of an asset
        • DELDelete the user-defined metadata of an asset
      • Multipart uploads
      • Video indexing tasks
    • 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 ReferenceUpload contentDirect uploads

Retrieve an asset

GET
https://api.twelvelabs.io/v1.3/assets/:asset_id
GET
/v1.3/assets/:asset_id
$curl https://api.twelvelabs.io/v1.3/assets/6298d673f1090f1100476d4c \
> -H "x-api-key: <apiKey>"
1{
2 "_id": "6298d673f1090f1100476d4c",
3 "created_at": "2022-06-02T10:30:00Z",
4 "duration": 120.5,
5 "file_type": "image/jpeg",
6 "filename": "image-01.jpg",
7 "hls": {
8 "manifest_url": "https://cdn.example.com/assets/6298d673f1090f1100476d4c/manifest.m3u8",
9 "status": "ready"
10 },
11 "method": "direct",
12 "size": 104857600,
13 "status": "ready",
14 "thumbnail": {
15 "representative_url": "https://cdn.example.com/assets/6298d673f1090f1100476d4c/thumbnail.jpg",
16 "status": "ready"
17 },
18 "user_metadata": {}
19}
This method retrieves details about the specified asset.
Was this page helpful?
Previous

List assets

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

asset_idstringRequired
The unique identifier of the asset to retrieve.

Response

The asset has been successfully retrieved.
_idstring
The unique identifier of the asset.
created_atstringformat: "date-time"

The date and time, in RFC 3339 format (“YYYY-MM-DDTHH:mm:ssZ”), when the asset was created.

durationdouble
The duration of the asset in seconds. Only present for video and audio assets. This field is absent for image assets or while the asset is still being processed.
file_typestring
The MIME type of the asset file.
filenamestring
The name of the file used to create the asset.
hlsobject
HLS streaming details for the asset. Present only when HLS generation has been requested. Omitted otherwise.
methodenum

Indicates how you uploaded the asset.

Values:

  • direct: Uploaded from your local file system
  • url: Uploaded from a publicly accessible URL
  • multipart: Uploaded using the multipart upload flow
Allowed values:
sizeinteger
The file size of the asset in bytes. This field is absent while the asset is still being processed.
statusenum

Indicates the current status of the asset.

Values:

  • failed: The platform failed to process the upload
  • processing: The platform is processing the uploaded file
  • ready: The asset is ready to use
Allowed values:
thumbnailobject
Thumbnail details for the asset. Present only when thumbnail generation has been requested. Omitted otherwise.
user_metadatamap from strings to any

User-defined metadata for this asset. This field is absent when no metadata has been set.

Errors

400
Bad Request Error

Your API key.

Note

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