Create an asset
Changed onThis method creates an asset by uploading a file to the platform. Assets are reusable files that you can use in different workflows.
The platform processes uploads asynchronously. This method returns immediately with the asset in the processing status, which then transitions to the ready status on success or to the failed status when the file is invalid, corrupt, or unreadable. Poll the Retrieve an asset endpoint until the status of the asset is ready before you use it. This applies to every upload, including small files.
Supported content:
- Video, audio, and images.
- PDF, text, and Markdown files.
Filename extension matching is case-insensitive; for example, notes.MD and notes.md are treated the same. The platform rejects unsupported formats. For documents, it also rejects files whose extensions don't match the detected content.
Upload methods:
- Local file: Set the method parameter to direct and use the file parameter to specify the file.
- Publicly accessible URL: Set the method parameter to url and use the url parameter to specify the URL of your file.
Upload limits:
- Video and audio, local files: Up to 200 MB
- Video and audio, public URLs: Up to 4 GB
- Images: Up to 32 MB
- Documents, local files: Up to 200 MB
- Documents, public URLs: Up to 512 MB
Asset creation does not enforce a maximum duration for video and audio files. Each model applies its own file size and duration limits. For details, see the requirements below.
Additional requirements depend on your workflow:
- Search: Marengo requirements
- Video analysis: Pegasus requirements
- Entity search: Marengo image requirements
- Create embeddings: Marengo requirements
Request
- Base URL: https://api.twelvelabs.io/v1.3
- URL: https://api.twelvelabs.io/v1.3/assets
- Auth: API key in header x-api-key
Request body multipart/form-data
Response
The asset has been successfully created.
Changes
- warning
deleted the
headerrequest parameterx-api-key - info
the endpoint scheme security
x-api-keywas added to the API
- warning
- info
api operation id
createremoved and replaced withassets_create
- info