New sign-ups for the Free plan are temporarily paused. Paid plans remain available.
LDX hub API

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

POST
https://gw.ldxhub.io
/uploads

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.

Create an upload session › Headers

Authorization
​string · required

The 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

filename
​string · required

The filename of the file to upload

Create an upload session › Responses

Upload session created

file_id
​string

Unique file identifier. Use this value in job requests.

filename
​string

Original filename

size
​integer

File size in bytes

created_at
​string · date-time
updated_at
​string · date-time
expires_at
​string · date-time

Files are automatically deleted after a period of time


Append a chunk to an upload

PUT
https://gw.ldxhub.io
/uploads/{file_id}

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.

Append a chunk to an upload › path Parameters

file_id
​string · required

The file ID obtained from POST /uploads

Append a chunk to an upload › Headers

Authorization
​string · required

The 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

data
​string · required

Base64-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_id
​string

Unique file identifier. Use this value in job requests.

filename
​string

Original filename

size
​integer

File size in bytes

created_at
​string · date-time
updated_at
​string · date-time
expires_at
​string · date-time

Files are automatically deleted after a period of time