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
AnalyzeDoc Models
    List available modelsget
AnalyzeDoc Jobs
    List AnalyzeDoc job historygetCreate an AnalyzeDoc jobpostGet AnalyzeDoc 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

AnalyzeDoc Jobs

Create and manage AnalyzeDoc document analysis jobs


List AnalyzeDoc job history

GET
https://gw.ldxhub.io
/analyzedoc/jobs

Returns a list of jobs for the authenticated user, ordered by creation date descending. Use GET /analyzedoc/jobs/{job_id} to retrieve full details for a specific job.

List AnalyzeDoc job history › 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.

List AnalyzeDoc job history › Responses

A list of jobs

​AnalyzeDocJobSummary[]
GET/analyzedoc/jobs
curl https://gw.ldxhub.io/analyzedoc/jobs \ --header 'Authorization: Bearer <token>'
Example Responses
{ "data": [ { "job_id": "am60z92bmdwphs95dxclndk3erh3x8jy", "file_id": "am60ghq3ys9epxbpzi5xsig4gi61cl59", "model": "openai/gpt-5.5@high", "status": "completed", "progress": 100, "created_at": "2026-07-02T09:15:11Z", "updated_at": "2026-07-02T09:15:32Z", "completed_at": "2026-07-02T09:15:30Z", "expires_at": "2026-07-03T09:15:30Z", "usage": { "input_pages": 3, "output_characters": 412 } } ] }
json
application/json

Create an AnalyzeDoc job

POST
https://gw.ldxhub.io
/analyzedoc/jobs

Enqueues an asynchronous document analysis job. Upload your PDF or image file via POST /files first, then submit the file_id here. The vision AI model reads the document and returns structured JSON following your example_output. Returns 202 Accepted immediately with a job_id. Poll GET /analyzedoc/jobs/{job_id} to check completion. When completed, download the extracted JSON via GET /files/{output_file_id}/content.

Supported input formats: PDF, JPEG, PNG. The input format is automatically detected from the uploaded file. Format support varies by model — the request is rejected with 400 if the selected model does not support the detected input format.

Create an AnalyzeDoc job › 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 AnalyzeDoc job › Request Body

AnalyzeDocCreateJobRequest
model
​string · required

Model ID obtained from GET /analyzedoc/models, including the resolution variant suffix (e.g. '@high').

system_prompt
​string · required

Instruction describing what structured data to extract from the document and how

example_output
​object · required

A JSON object showing the desired output structure with example values. Key order matters: it guides the order in which fields are generated (a hint, not a guarantee), so place discriminator fields such as 'type' first. Keys set to null in the example become optional in the output.

file_id
​string · required

File ID of the input document to analyze, obtained from POST /files. Supported input formats: PDF, JPEG, PNG. The input format is automatically detected from the uploaded file. Format support varies by model — check 'supported_conversions' in GET /analyzedoc/models.

output_format
​string · enum · required

Output format

Enum values:
json

Create an AnalyzeDoc job › Responses

Job accepted

Response returned immediately after job submission
JobCreateResponse
job_id
​string

Unique job identifier. Use this to poll for results.

model
​string
status
​string · enum
Enum values:
queued
progress
​number · float
created_at
​string · date-time
updated_at
​string · date-time
expires_at
​string · date-time
POST/analyzedoc/jobs
curl https://gw.ldxhub.io/analyzedoc/jobs \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "model": "openai/gpt-5.5@high", "system_prompt": "Extract the invoice number, vendor name, and total amount from the document.", "example_output": { "invoice_number": "INV-2026-001", "vendor": "Acme Corp", "total_amount": 125000 }, "file_id": "ako5rgx309ehwlbqprs8s2xxnsp0y85q", "output_format": "json" }'
Example Request Body
{ "model": "openai/gpt-5.5@high", "system_prompt": "Extract the invoice number, vendor name, and total amount from the document.", "example_output": { "invoice_number": "INV-2026-001", "vendor": "Acme Corp", "total_amount": 125000 }, "file_id": "ako5rgx309ehwlbqprs8s2xxnsp0y85q", "output_format": "json" }
json
application/json
Example Responses
{ "job_id": "am60z92bmdwphs95dxclndk3erh3x8jy", "model": "openai/gpt-5.5@high", "status": "queued", "progress": 0, "created_at": "2026-07-02T09:15:11Z", "updated_at": "2026-07-02T09:15:11Z", "expires_at": "2026-07-03T09:15:11Z" }
json
application/json

Get AnalyzeDoc job status and results

GET
https://gw.ldxhub.io
/analyzedoc/jobs/{job_id}

Returns the current status of an AnalyzeDoc job. Poll this endpoint until status is completed or failed. Recommended polling interval: 1-5 seconds. When status is completed, use output_file_id to download the extracted JSON via GET /files/{output_file_id}/content. Results are retained for a limited period after completion (expires_at).

Get AnalyzeDoc job status and results › path Parameters

job_id
​string · required

The unique identifier of the job

Get AnalyzeDoc job status and results › 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.

Get AnalyzeDoc job status and results › Responses

Job details

Full job details. Returned by GET /analyzedoc/jobs/{job_id}.
AnalyzeDocJobDetail
job_id
​string
file_id
​string

Input file ID

model
​string
status
​string · enum
Enum values:
queued
processing
completed
failed
progress
​number · float
output_file_id
​string

File ID of the extracted JSON output. Present only when status is completed. Download via GET /files/{output_file_id}/content.

​JobError

Job-level error. Present only when job status is failed.

created_at
​string · date-time
updated_at
​string · date-time
completed_at
​string · date-time
expires_at
​string · date-time
​Usage
GET/analyzedoc/jobs/{job_id}
curl https://gw.ldxhub.io/analyzedoc/jobs/:job_id \ --header 'Authorization: Bearer <token>'
Example Responses
{ "job_id": "am60z92bmdwphs95dxclndk3erh3x8jy", "file_id": "am60ghq3ys9epxbpzi5xsig4gi61cl59", "model": "openai/gpt-5.5@high", "status": "processing", "progress": 50, "created_at": "2026-07-02T09:15:11Z", "updated_at": "2026-07-02T09:15:20Z", "expires_at": "2026-07-03T09:15:11Z" }
json
application/json

AnalyzeDoc ModelsRefineLoop Models