Create an asset
This 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 image files.
- 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
Headers
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>Response
The asset has been successfully created.