Import files

This method imports one or more files from the connected provider account into the platform as assets. Video files can be up to 10 GB, audio files up to 4 GB, and images up to 32 MB. Each newly imported file creates an asset in the `processing` status and is downloaded asynchronously. If you import a file that was already imported through this account, the platform returns the existing asset with its current status, which may be `ready`, without downloading the file again. The response returns one entry per requested file, in request order.

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

connection_idstringRequired
The unique identifier of the connection to import through.

Request

This endpoint expects an object.
itemslist of objectsRequired

The files to import. Provide an array of one item for a single import, or multiple items for a batch import. A maximum of 100 items can be imported per request. Each source_id must be unique within a request.

Response

The import request has been accepted. The response returns one item per requested file, in request order. An accepted item includes the asset_id and status fields. A rejected item includes an error object instead and omits those fields. The has_failures field is true when any item was rejected.

_idstring
The unique identifier of the import created for this request.
has_failuresboolean

Whether any item was rejected before an asset was created. When true, inspect the error object of each item to identify the rejected ones.

itemslist of objects
One entry per requested file, in request order.

Errors

400
Bad Request Error
404
Not Found Error
409
Conflict Error