Create upload sessions and send file data in Base64-encoded chunks. Use this for MCP clients or environments where multipart/form-data is not available.
Create an upload session
Creates an empty file and returns a file_id to use for chunk uploads.
Use this endpoint when uploading files via JSON (e.g. from MCP clients).
After creating the session, send file data in chunks via PUT /uploads/{file_id}.
For direct file uploads, use POST /files (multipart/form-data) instead.
Headers
AuthorizationThe Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.
Create an upload session › Request Body
filenameThe filename of the file to upload
Create an upload session › Responses
Upload session created
file_idUnique file identifier. Use this value in job requests.
filenameOriginal filename
sizeFile size in bytes
created_atupdated_atexpires_atFiles are automatically deleted after a period of time
Append a chunk to an upload
Appends a Base64-encoded chunk of data to an existing upload session. Repeat this request until all chunks have been sent. Each chunk must not exceed 5MB of the original (pre-encoded) data.
The response reflects the current total file size after each chunk is appended.
Idempotency
This endpoint is not idempotent. Calling it multiple times with the same chunk will append the data repeatedly, producing a corrupted file.
If you are unsure whether a previous request succeeded (e.g. due to a network error or client-side retry), call GET /files/{file_id} first to check the current size before retrying.
Note for AI / MCP clients
If your MCP runtime returns a client-side error (such as a tool definition validation error) before sending the request, the underlying HTTP request may still have been transmitted in some implementations.
Always verify the current size via GET /files/{file_id} before retrying — do not rely on the absence of a successful response to conclude that no data was sent.
path Parameters
file_idThe file ID obtained from POST /uploads
Headers
AuthorizationThe Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.
Append a chunk to an upload › Request Body
dataBase64-encoded chunk of the file. Each chunk must not exceed 5MB of the original (pre-encoded) data.
Append a chunk to an upload › Responses
Chunk appended successfully
file_idUnique file identifier. Use this value in job requests.
filenameOriginal filename
sizeFile size in bytes
created_atupdated_atexpires_atFiles are automatically deleted after a period of time

