---
title: "Create a multipart upload session"
method: POST
path: "/assets/multipart-uploads"
tags: ["multipartUpload"]
---

# Create a multipart upload session

`POST /assets/multipart-uploads`

This method creates a multipart upload session for a local file.

**Supported content**: Video, audio, and images.

**Upload limits**:
- **Video and audio**: Up to 10 GB
- **Images**: Up to 32 MB

**Additional requirements** depend on your workflow:
- **Search**: [Marengo requirements](/v1.3/docs/concepts/models/marengo#video-file-requirements)
- **Video analysis**: [Pegasus requirements](/v1.3/docs/concepts/models/pegasus#input-requirements)
- **Entity search**: [Marengo image requirements](/v1.3/docs/concepts/models/marengo#image-file-requirements)
- **Create embeddings**: [Marengo requirements](/v1.3/docs/concepts/models/marengo#input-requirements)

## Headers

- `x-api-key` string, required

## Request body

- CreateAssetUploadRequest
  - `filename` string, required — The original file name of the asset.
  - `type` 'video' | 'audio' | 'image', required — The type of asset you want to upload.
  - `total_size` integer, required — The total size of the file in bytes. The platform uses this value to: - Calculate the optimal chunk size. - Determine the total number of chunks required - Generate the initial set of presigned URLs **Upload limits**: - **Video and audio**: Up to 10 GB - **Images**: Up to 32 MB
  - `enable_hls` boolean — When set to `true`, the platform generates an HLS playlist and segments for streaming. Applicable to video and audio assets only. **Default**: `false`.
  - `enable_thumbnail` boolean — When set to `true`, the platform generates thumbnail images from the uploaded content. **Default**: `false`.
  - `user_metadata` UserMetadata — Metadata that helps you categorize your assets. The object contains user-defined keys and values, where keys are strings and values are one of `string`, `integer`, `float`, or `boolean`. **Example**: ```JSON "user_metadata": { "category": "recentlyAdded", "batchNumber": 5, "rating": 9.3, "needsReview": true } ``` <Note title="Note"> To store other types of data, such as objects or arrays, convert your data into string values before sending it. </Note>

## Response `201`

The multipart upload session has been successfully created.

- CreateAssetUploadResponse
  - `upload_id` string — The unique identifier of this upload session. Store this value, as you'll need it for the following subsequent operations: - Reporting completed chunks - Requesting additional presigned URLs - Retrieving the status of this upload session This identifier remains valid for 24 hours from the time of creation.
  - `asset_id` string — The unique identifier for the asset being created. Store this value, as you'll need it to reference the asset in other API calls. Note that this identifier is reserved immediately, but the asset becomes available for other operations only after the upload is completed successfully.
  - `upload_urls` PresignedURLChunk[] — An array containing the initial set of presigned URLs for uploading chunks. Each URL corresponds to a specific chunk. Note the following about the presigned URLs: - URLs expire after one hour. - Depending on the size of the file, the initial set may not include URLs for all chunks. If you need more URLs, you can request additional ones using the [`POST`](/v1.3/api-reference/upload-content/multipart-uploads/get-additional-presigned-urls) method of the `/assets/multipart-uploads/{upload_id}/presigned-urls` endpoint.
    - `chunk_index` integer — The index of this chunk.
    - `url` string, uri — The presigned URL for uploading this chunk. Each URL can only be used once and expires after 1 hour.
    - `expires_at` string, date-time — A string representing the date and time, in RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"), when the resource will expire.
  - `upload_headers` object
  - `chunk_size` integer — The size in bytes for each chunk, except for the last chunk, which may be smaller. Use this value to divide your file into chunks of this exact size.
  - `total_chunks` integer — The total number of chunks into which your file must be split. Calculated as: ceiling(`total_size` / `chunk_size`).
  - `expires_at` string, date-time — A string representing the date and time, in RFC 3339 format (“YYYY-MM-DDTHH:mm:ssZ”), when the upload URL will expire. Upload URLs expire 24 hours from their creation. After expiration, you cannot resume the upload, and you must create a new upload session.

## Other responses

- `400` — The request has failed.
- `403` — The request has failed.
- `500` — The request has failed.

---

[API](https://skmtc.net/twelvelabs/apis/twelvelabs-api.md) · [All operations](https://skmtc.net/twelvelabs/apis/twelvelabs-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/twelvelabs/twelvelabs-api/versions/5dbd6e8473c9/schema)
