---
title: "Start multipart upload session"
method: POST
path: "/v2/batches/multipart-upload"
tags: ["batches"]
---

# Start multipart upload session

`POST /v2/batches/multipart-upload`

Start a multipart upload session. Use this endpoint when you need to upload a file larger than 10 MB to a batch.

The multipart upload process consists of three steps:
1. Create a multipart upload session (this endpoint)
2. [Upload file parts](/api-sdk/api-reference/batches/upload-multipart-part) to the session
3. [Commit the session](/api-sdk/api-reference/batches/commit-multipart-upload-session) to finalize the upload

## Headers

- `Authorization` string, required
- `IB-Context` string

## Request body

- object
  - `batch_id` integer, required — The batch ID to upload the file to.
  - `filename` string, required — A file name for the uploaded file on the AI Hub filesystem, including the file extension. Maximum of 255 characters.
  - `file_size` integer, required — The file size, in bytes. Can be an integer or a string.

## Response `201`

The multipart upload session was initiated.

- MultipartUploadSessionResponse
  - `session_id` string, required — ID of the multipart upload session.
  - `part_size` integer, required — The number of bytes each part should be when uploading to the session. Each part should match the part_size, except for the final part, which can be smaller than the part_size.

## Other responses

- `404` — Batch with the specified ID doesn't exist.

---

[API](https://skmtc.net/instabase/apis/api-reference.md) · [All operations](https://skmtc.net/instabase/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/instabase/api-reference/revisions/3a4f46d48141/schema)
