LDX hubLDX hub
  • Pricing
  • Documentation
  • API Reference
Information
Files
    List uploaded filesgetUpload a filepostGet file infogetDownload file contentget
Uploads
    Create an upload sessionpostAppend a chunk to an uploadput
StructFlow Models
    List available modelsget
StructFlow Jobs
    List StructFlow job historygetCreate a StructFlow jobpostGet StructFlow job status and resultsget
RefineLoop Models
    List available modelsget
RefineLoop Jobs
    List RefineLoop job historygetCreate a RefineLoop jobpostGet RefineLoop job status and resultsget
RenderOCR Engines
    List available enginesget
RenderOCR Jobs
    List RenderOCR job historygetCreate a RenderOCR jobpostGet RenderOCR job status and resultsget
CastDoc Engines
    List available enginesget
CastDoc Jobs
    List CastDoc job historygetCreate a CastDoc jobpostGet CastDoc job status and resultsget
ExtractDoc Engines
    List available enginesget
ExtractDoc Jobs
    List ExtractDoc job historygetCreate an ExtractDoc jobpostGet ExtractDoc job status and resultsget
MCP
    MCP Serverpost
Schemas
powered by Zuplo
LDX hub API
LDX hub API

Uploads

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

UploadCreateRequest
filename
​string · required

The filename of the file to upload

Create an upload session › Responses

Upload session created

FileInfo
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

POST/uploads
curl https://gw.ldxhub.io/uploads \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "filename": "document.xlf" }'
Example Request Body
{ "filename": "document.xlf" }
json
application/json
Example Responses
{ "file_id": "ako5rgx309ehwlbqprs8s2xxnsp0y85q", "filename": "document.xlf", "size": 0, "created_at": "2026-04-17T12:14:55Z", "updated_at": "2026-04-17T12:14:55Z", "expires_at": "2026-04-18T12:14:55Z" }
json
application/json

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

UploadAppendRequest
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

FileInfo
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

PUT/uploads/{file_id}
curl https://gw.ldxhub.io/uploads/:file_id \ --request PUT \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "data": "PD94bWwgdmVyc2lvbj0..." }'
Example Request Body
{ "data": "PD94bWwgdmVyc2lvbj0..." }
json
application/json
Example Responses
{ "file_id": "ako5rgx309ehwlbqprs8s2xxnsp0y85q", "filename": "document.xlf", "size": 78578, "created_at": "2026-04-17T12:14:55Z", "updated_at": "2026-04-17T12:15:52Z", "expires_at": "2026-04-18T12:15:52Z" }
json
application/json

FilesStructFlow Models