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

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
Authorization: Bearer YOUR_API_KEY

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/models
  • GET /analyzedoc/models
  • GET /refineloop/models
  • GET /renderocr/engines
  • GET /castdoc/engines
  • GET /extractdoc/engines
  • GET /castvoice/engines
  • GET /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.

  1. Upload a file if needed via POST /files
  2. Submit a job → receive a job_id
  3. Poll GET /{service}/jobs/{job_id} until status is completed or failed

Job Status

StatusDescription
queuedJob accepted and waiting to be processed
processingJob is currently being processed
completedJob finished successfully
failedJob 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.

CodeCauseWhat to do
invalid_parameterA 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_fileThe input file could not be read.Check that the file is in a supported format and not damaged.
too_many_pagesThe file has more pages than the engine accepts.Split the file and submit each part.
encrypted_fileThe file is encrypted (password-protected).Remove the password, then submit a new job.
infected_fileThe file was rejected by the virus scan.Check the file. Contact support if you believe this is a mistake.
resource_not_foundThe input file was not found or has expired.Upload the file again, then submit a new job.
limit_exceededThe usage limit has been reached.Contact support.
upstream_service_errorAn external service used by the engine (such as the AI model provider) was unavailable.Submit a new job later.
internal_server_errorAn unexpected error occurred on the LDX hub server.Submit a new job later. Contact support if it persists.
unknown_errorAny 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.

Tags