Mixedbread

Complete Multipart Upload

Complete a multipart upload after all parts have been uploaded. Creates the file object and returns it.

POST
/v1/files/uploads/{upload_id}/complete

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Api key to access Mixedbreads API

Path Parameters

upload_id*Upload Id

The ID of the multipart upload

Formatuuid

Request Body

application/json
  1. body
parts*array<>

List of completed parts with their ETags

Items1 <= items

Response Body

The completed file details

application/json
  1. response

A model representing a file object in the system.

This model contains metadata about files stored in the system, including identifiers, size information, and timestamps.

id*Id

Unique identifier for the file

filename*Filename

Name of the file including extension

Length1 <= length
bytes*Bytes

Size of the file in bytes

Range0 < value
mime_type*Mime Type

MIME type of the file

Match^[\w\.\-\+]+/[\w\.\-\+]+(\.\w+)*$
version*Version

Version of the file

Range1 <= value
created_at*Created At

Timestamp when the file was created

Formatdate-time
updated_at*Updated At

Timestamp when the file was last updated

Formatdate-time
Example Request
from mixedbread import Mixedbread

mxbai = Mixedbread(api_key="YOUR_API_KEY")

res = mxbai.files.uploads.complete(
    "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    parts=[
        {"part_number": 1, "etag": '"abc123def456"'},
        {"part_number": 2, "etag": '"789ghi012jkl"'},
    ],
)

print(res)
Example Response
{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "filename": "large-document.pdf",
  "bytes": 104857600,
  "mime_type": "application/pdf",
  "version": 1,
  "created_at": "2025-01-15T10:00:00.000Z",
  "updated_at": "2025-01-15T10:05:00.000Z",
  "object": "file"
}