LDX hub API
LDX hub provides AI-powered document and audio processing APIs including StructFlow (unstructured text to structured JSON), AnalyzeDoc (vision-based structured data extraction — AI models visually read PDF and image documents and return structured JSON), RefineLoop (XLIFF translation quality refinement), RenderOCR (OCR conversion of PDF and images to editable Office formats with layout and formatting preservation), CastDoc (high-fidelity PDF-to-Office conversion without OCR), ExtractDoc (fast text extraction from documents in reading order, designed as a preprocessing step for downstream AI pipelines), CastVoice (speech-to-text transcription of audio files into SRT subtitles or plain text), and RenderVoice (text-to-speech synthesis of text files into natural-sounding speech).
Authentication
Send your API key in the Authorization header as a Bearer token.
Code
Access keys are available after subscription via the Developer Portal.
Public endpoints (no authentication required)
The following metadata endpoints are publicly accessible without authentication when accessed via HTTP API, designed for dynamic discovery in workflow tools (e.g., n8n, Dify):
GET /structflow/modelsGET /analyzedoc/modelsGET /refineloop/modelsGET /renderocr/enginesGET /castdoc/enginesGET /extractdoc/enginesGET /castvoice/enginesGET /rendervoice/engines
MCP Server
LDX hub provides an MCP (Model Context Protocol) endpoint at POST /mcp for AI tool integration (e.g., Claude Desktop).
All operations via the MCP server require authentication, regardless of the HTTP API auth tier above.
Asynchronous Processing
All jobs are processed asynchronously.
- Upload a file if needed via
POST /files - Submit a job → receive a
job_id - Poll
GET /{service}/jobs/{job_id}untilstatusiscompletedorfailed
Job Status
| Status | Description |
|---|---|
queued | Job accepted and waiting to be processed |
processing | Job is currently being processed |
completed | Job finished successfully |
failed | Job failed. error gives the reason (see Job Errors) |
Job Errors
When a job's status is failed, its error object contains code, message, and request_id.
| Code | Cause | What to do |
|---|---|---|
invalid_parameter | A setting or the input was not accepted, for example because the input file is empty. message gives the reason. | Fix the request as message describes, then submit a new job. |
unsupported_file | The input file could not be read. | Check that the file is in a supported format and not damaged. |
too_many_pages | The file has more pages than the engine accepts. | Split the file and submit each part. |
encrypted_file | The file is encrypted (password-protected). | Remove the password, then submit a new job. |
infected_file | The file was rejected by the virus scan. | Check the file. Contact support if you believe this is a mistake. |
resource_not_found | The input file was not found or has expired. | Upload the file again, then submit a new job. |
limit_exceeded | The usage limit has been reached. | Contact support. |
upstream_service_error | An external service used by the engine (such as the AI model provider) was unavailable. | Submit a new job later. |
internal_server_error | An unexpected error occurred on the LDX hub server. | Submit a new job later. Contact support if it persists. |
unknown_error | Any other failure. | Submit a new job. Contact support if it persists. |
When you contact support, include the job_id and request_id. New codes may be added in the future; handle any code not listed here as unknown_error.
Billing
Usage is measured in credits. Each credit costs $0.0001. Credit consumption varies by service, AI engine, and data volume. StructFlow, RefineLoop, and AnalyzeDoc are billed by the input and output tokens of the AI model. See LDX hub Pricing for details.

