> ## Documentation Index
> Fetch the complete documentation index at: https://autorender.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload parts

> PUT each file chunk to its presigned URL from Multipart start.

<RequestExample>
  ```bash cURL theme={null}
  curl --request PUT \
    --url 'https://PRESIGNED_URL_FROM_PARTS_ARRAY' \
    --header 'Content-Type: application/octet-stream' \
    --data-binary '@/path/to/chunk.bin'
  ```
</RequestExample>

<ResponseExample>
  ```text 200 theme={null}
  HTTP/1.1 200 OK
  ETag: "<string>"
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": "<string>"
  }
  ```
</ResponseExample>

## Overview

Upload one part at a time, as raw binary, to the URL in `parts[i]` from [Multipart start](/docs/api-reference/multipart-start). Do not send your Autorender API key — these requests go straight to storage, not to Autorender. After every part succeeds, call [Multipart complete](/docs/api-reference/multipart-complete).

Replace the `--url` value with each full presigned URL from the `parts` array, including any query parameters. The path shown here is for documentation tooling only; production requests go to storage, not `upload.autorender.io`.

## Request

### URL

Each element of `parts` in the start response (full URL, including query parameters if present).

### Headers

| Header         | Required | Value                      |
| -------------- | -------- | -------------------------- |
| `Content-Type` | Yes      | `application/octet-stream` |

### Body

Binary chunk: `part_size` bytes for each part except the last (may be shorter). Total bytes must equal the `size` you sent at start.

### Split file and upload every part

If the start response is saved as `start-response.json`:

```bash theme={null}
PART_SIZE=$(jq -r '.part_size' start-response.json)
split -b "$PART_SIZE" "./big-video.mp4" /tmp/mpart_

i=0
for chunk in /tmp/mpart_*; do
  url=$(jq -r ".parts[$i]" start-response.json)
  curl --request PUT \
    --url "$url" \
    --header "Content-Type: application/octet-stream" \
    --data-binary @"$chunk"
  i=$((i + 1))
done
```

## Response

Storage typically returns **200 OK** and may include an **ETag** header.

## Workflow

This is **step 2 of 3**. Before: [**Multipart start**](/docs/api-reference/multipart-start). After: [**Multipart complete**](/docs/api-reference/multipart-complete).
