Overview

The OCR API turns clinical documents into structured, machine-readable text. Built on emtelligent’s proprietary vision-language model, it is designed for the complexities of real-world medical documents: multiple file formats, multiple languages, the complex tables common in medical reports, and large-volume processing.

Input

Accepts PDF, JPG, PNG and TIFF, including multi-page TIFF.

Format is auto-detected from the file’s byte signature, not its extension or declared MIME type — so mislabelled or extension-less files still process correctly.

Output

Per-page full text plus a structured, per-block breakdown.

  • Text is Markdown-formatted. Tables are also provided as HTML, preserving structure such as merged and spanning cells and multi-line cells, alongside a Markdown rendering.
  • Per-page metadata: total page count, and a list of any failed pages, each tagged with the stage that failed — so partial failures are explicit rather than silent.

Layout-aware extraction

End-to-end document parsing captures the full hierarchical context of a page, interpreting section headings, clinical text and complex tables without losing the document’s structural integrity.

Blocks carry reading order at both page and document level, so text can be reassembled in natural reading order. That matters for multi-column and structured clinical layouts, where naive top-to-bottom extraction interleaves unrelated content.

Complex tables

Spanning cells (colspan/rowspan), multi-line cells, and nested header and label structures are preserved as structured HTML rather than flattened to plain text.

Bounding boxes

Every block includes a normalised bounding box — [x, y, w, h], in the range 0–1 with a top-left origin — locating it on the page. Because the coordinates are normalised, they hold independently of page size or resolution.

That enables:

  • source overlay and highlighting
  • region-level redaction
  • linking extracted content back to its position in the original document

How a job works

The API is asynchronous, which is what makes it viable for large and long-running documents. Pages are processed concurrently, and jobs are resumable and durable with live per-stage progress.

1

Submit

Post the input file as a raw request body. It is streamed to disk and a job is created.

2

Poll

Check job status for pipeline state and counters. A job moves through queuedrenderingocrdone, or failed.

3

Fetch the result

Retrieve the result once the job reaches done.

4

Delete (optional)

Purge the job’s content artifacts — result, input file and rendered pages — on demand. The job’s metadata is retained.

Performance observability

Job status optionally includes a per-page timing report: render and OCR durations with distribution statistics (mean, median, p95, slowest page), for throughput and performance visibility.

Security and data handling

Authentication is by API key, sent as a bearer token.

Results auto-purge after retrieval or a short retention window of roughly 24 hours, and can be deleted on demand — minimising how long document content persists on the service.

A request for a purged or expired result is reported distinctly from one for a job that never existed, so a client can tell “gone” from “not found”.

Using OCR with the other APIs

The OCR API can be used on its own. It is also used internally by the Prep API, which makes documents machine-readable as part of splitting and classifying a bundle — so if you are already calling Prep, you do not need to call OCR separately.