Retrieve an asset

This method retrieves details about the specified asset.

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.
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
statusenum

Indicates the current processing status of the asset.

A newly uploaded asset starts in the processing status and transitions asynchronously to ready on success or to failed on error, typically within a few seconds to a few minutes. Poll the Retrieve an asset endpoint until the status is ready before you use the asset in downstream workflows.

Values:

  • processing: The asset is not yet usable. This can mean the upload is still in progress (for example, the platform is still fetching the file from a URL, or a multipart upload has not completed), or the upload has finished and the platform is validating the file. The technical_metadata field is omitted from the response.
  • ready: The platform validated the asset successfully, and the asset is ready to use.
  • failed: The platform could not process the file. The error field describes the reason, and the technical_metadata field may be partially populated.
filenamestring
The name of the file used to create the asset.
file_typestring
The MIME type of the asset file.
created_atstringformat: "date-time"

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

user_metadatamap from strings to any

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

hlsobject
HLS streaming details for the asset. Present only when HLS generation has been requested. Omitted otherwise.
thumbnailobject
Thumbnail details for the asset. Present only when thumbnail generation has been requested. Omitted otherwise.
technical_metadataobject

Technical metadata read from the media file of the asset, covering the container, the individual video and audio streams, image properties, and derived attributes.

The platform populates this object asynchronously after the upload completes. It is omitted from the response while the status of the asset is processing, and it may be partially populated when the status is failed. A field is absent when it does not apply to the media type of the asset, or when the source file did not carry the corresponding information.

sizelong

The file size of the asset in bytes. The platform finalizes this value when the asset reaches the ready status.

durationdouble

The duration of the asset in seconds. Only present for video and audio assets; absent for images. The platform finalizes this value when the asset reaches the ready status.

errorobject

The reason the asset failed. The platform returns this field only when status is failed.

Errors

400
Bad Request Error