Mixedbread

Create Multipart Upload

Initiate a multipart upload and receive presigned URLs for uploading parts directly to storage.

POST
/v1/files/uploads

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Api key to access Mixedbreads API

Request Body

application/json
  1. body
filename*Filename

Name of the file including extension

Length1 <= length
file_size*File Size

Total size of the file in bytes

Range0 < value
mime_type*Mime Type

MIME type of the file

Match^[\w\.\-\+]+/[\w\.\-\+]+(\.\w+)*$
part_count?Part Count

Number of parts to split the upload into

Range1 <= value <= 10000
Default1

Response Body

The multipart upload details with presigned URLs

application/json
  1. response
id*Id

The multipart upload ID (use this to complete or abort)

part_urls*array<>

Presigned URLs for uploading parts

Example Request
from mixedbread import Mixedbread

mxbai = Mixedbread(api_key="YOUR_API_KEY")

res = mxbai.files.uploads.create(
    filename="large-document.pdf",
    file_size=104857600,
    mime_type="application/pdf",
    part_count=10,
)

print(res)
Example Response
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "part_urls": [
    {
      "part_number": 1,
      "url": "https://storage.example.com/upload?partNumber=1&uploadId=..."
    },
    {
      "part_number": 2,
      "url": "https://storage.example.com/upload?partNumber=2&uploadId=..."
    }
  ]
}