Upload content

The AssetsClient class provides methods for uploading your videos, images, and audio files to the TwelveLabs platform. Uploading creates an asset that you can then use in different workflows.

Depending on your requirements, choose one of the methods below.

Direct uploads

Upload whole files in a single request.

Supported content: Video, audio, and images.

Use this method when:

  • You want to upload a file in a single request
  • You are uploading images (multipart uploads do not support images)
  • You are uploading a file from a URL (multipart uploads support only local files)
  • Your files are small enough that chunking adds no benefit

Upload limits:

  • Video and audio, local files: Up to 200 MB
  • Video and audio, public URLs: Up to 4 GB
  • Images: Up to 5 MB

Multipart uploads

Upload files as multiple chunks processed in parallel.

Supported content: Video.

Use this method when:

  • You need to upload a larger local video file
  • You need automatic retry on failure
  • You need improved reliability, performance, or observability
  • You want to track upload progress
  • You want parallel chunk uploads for faster performance

Upload limits: Local video files up to 4 GB.

Video indexing tasks

This method will be deprecated in a future version. New implementations should use direct or multipart uploads followed by separate indexing.

Upload and index videos in one operation. This method bundles upload and indexing together.