> This page is for version v1.3 (default).
> For other versions, use one of these documentation indexes:
> - v1.3 (default): https://docs.twelvelabs.io/v1.3/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.twelvelabs.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.twelvelabs.io/_mcp/server.

# Report uploaded chunks

POST https://api.twelvelabs.io/v1.3/assets/multipart-uploads/{upload_id}
Content-Type: application/json

This method reports successfully uploaded chunks to the platform. The platform finalizes the upload after you report all chunks.


For optimal performance, report chunks in batches and in any order.


Reference: https://docs.twelvelabs.io/api-reference/upload-files/multipart-uploads/report-chunk-batch

## Authentication

- `x-api-key` header (required) — Your API key. You can find your API key on the API Keys page.

## Request

### Path parameters

- `upload_id` (string, required) — The unique identifier of the upload session.

### Body (application/json)

This endpoint expects a ReportChunkBatchRequest.

- `completed_chunks` (list of CompletedChunk, required) — The list of chunks successfully uploaded that you're reporting to the platform. Report only after receiving an ETag.

## Response

### 200

The completion of this batch has been successfully reported.

- `url` (string, optional) — The URL for accessing your asset. The platform returns this field only when all chunks are reported and the upload is complete. If absent, continue uploading and reporting the remaining chunks.
- `asset_id` (string, optional) — The unique identifier of this asset.
- `processed_chunks` (integer, optional) — The number of chunks accepted from this specific request. This equals the number of chunks in your `completed_chunks` array minus any duplicates.
- `duplicate_chunks` (integer, optional) — The number of chunks in this request that were already reported. Duplicates are ignored and don't affect your upload.
- `total_completed` (integer, optional) — The cumulative count of all unique chunks successfully reported across all requests. When this equals `total_chunks`, the upload is complete.

## Errors

### 400 Bad Request Error

The request has failed.

- `code` (string, optional) — A string representing the code associated with the error. See the [Error codes](/v1.3/api-reference/error-codes) page for details.
- `message` (string, optional) — A human-readable string describing the error, intended to be suitable for display in a user interface.

### 403 Forbidden Error

The request has failed.

- `code` (string, optional) — A string representing the code associated with the error. See the [Error codes](/v1.3/api-reference/error-codes) page for details.
- `message` (string, optional) — A human-readable string describing the error, intended to be suitable for display in a user interface.

### 404 Not Found Error

Upload not found.

- `any`

## Types

### CompletedChunk

- `chunk_index` (integer, required) — The number that identifies which chunk you uploaded. When you received presigned URLs from the platform, each URL was assigned an index number. Use that same number. The chunks are numbered starting from 1.
- `proof` (string, required) — The ETag value you received after uploading the chunk. When you upload a chunk to a presigned URLs, the response includes an ETag. Use this value and submit it as proof of successful upload.
- `proof_type` (enum, required) — The verification method. Supported value: `etag`.
  - Allowed values: `etag`
- `chunk_size` (integer, required) — The number of bytes uploaded for this chunk. For all chunks except the last, this value equals [`chunk_size`](/v1.3/api-reference/upload-content/multipart-uploads/create#response.body.chunk_size). For the last chunk, it may be smaller.

## Examples

**Request**

```json
{
  "completed_chunks": [
    {
      "chunk_index": 1,
      "proof": "d41d8cd98f00b204e9800998ecf8427e",
      "proof_type": "etag",
      "chunk_size": 5242880
    }
  ]
}
```

**Response**

```json
{
  "url": "https://cdn.example.com/assets/video.mp4",
  "asset_id": "507f1f77bcf86cd799439012",
  "processed_chunks": 5,
  "duplicate_chunks": 0,
  "total_completed": 15
}
```

**SDK Code**

```python
import requests

url = "https://api.twelvelabs.io/v1.3/assets/multipart-uploads/507f1f77bcf86cd799439011"

payload = { "completed_chunks": [
        {
            "chunk_index": 1,
            "proof": "d41d8cd98f00b204e9800998ecf8427e",
            "proof_type": "etag",
            "chunk_size": 5242880
        }
    ] }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.twelvelabs.io/v1.3/assets/multipart-uploads/507f1f77bcf86cd799439011';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"completed_chunks":[{"chunk_index":1,"proof":"d41d8cd98f00b204e9800998ecf8427e","proof_type":"etag","chunk_size":5242880}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.twelvelabs.io/v1.3/assets/multipart-uploads/507f1f77bcf86cd799439011"

	payload := strings.NewReader("{\n  \"completed_chunks\": [\n    {\n      \"chunk_index\": 1,\n      \"proof\": \"d41d8cd98f00b204e9800998ecf8427e\",\n      \"proof_type\": \"etag\",\n      \"chunk_size\": 5242880\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.twelvelabs.io/v1.3/assets/multipart-uploads/507f1f77bcf86cd799439011")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"completed_chunks\": [\n    {\n      \"chunk_index\": 1,\n      \"proof\": \"d41d8cd98f00b204e9800998ecf8427e\",\n      \"proof_type\": \"etag\",\n      \"chunk_size\": 5242880\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.twelvelabs.io/v1.3/assets/multipart-uploads/507f1f77bcf86cd799439011")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"completed_chunks\": [\n    {\n      \"chunk_index\": 1,\n      \"proof\": \"d41d8cd98f00b204e9800998ecf8427e\",\n      \"proof_type\": \"etag\",\n      \"chunk_size\": 5242880\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.twelvelabs.io/v1.3/assets/multipart-uploads/507f1f77bcf86cd799439011', [
  'body' => '{
  "completed_chunks": [
    {
      "chunk_index": 1,
      "proof": "d41d8cd98f00b204e9800998ecf8427e",
      "proof_type": "etag",
      "chunk_size": 5242880
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.twelvelabs.io/v1.3/assets/multipart-uploads/507f1f77bcf86cd799439011");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"completed_chunks\": [\n    {\n      \"chunk_index\": 1,\n      \"proof\": \"d41d8cd98f00b204e9800998ecf8427e\",\n      \"proof_type\": \"etag\",\n      \"chunk_size\": 5242880\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["completed_chunks": [
    [
      "chunk_index": 1,
      "proof": "d41d8cd98f00b204e9800998ecf8427e",
      "proof_type": "etag",
      "chunk_size": 5242880
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.twelvelabs.io/v1.3/assets/multipart-uploads/507f1f77bcf86cd799439011")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```