Create Multipart Upload
Initiate a multipart upload and receive presigned URLs for uploading parts directly to storage.
POST
ApiKeyAuthheader
AuthorizationBearer <token>Api key to access Mixedbreads API
application/json- body
filename*FilenameName of the file including extension
Length
1 <= lengthfile_size*File SizeTotal size of the file in bytes
Range
0 < valuemime_type*Mime TypeMIME type of the file
Match
^[\w\.\-\+]+/[\w\.\-\+]+(\.\w+)*$part_count?Part CountNumber of parts to split the upload into
Range
1 <= value <= 10000Default
1The multipart upload details with presigned URLs
application/json- response
id*IdThe multipart upload ID (use this to complete or abort)
part_urls*array<>Presigned URLs for uploading parts
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=..."
}
]
}