OCRRouter

docTR vs olmOCR

Pick docTR when you need words and lines with coordinates from invoices or receipts and want to run on CPU or a small GPU. Pick olmOCR when you need clean Markdown from PDFs, including equations, tables and handwriting, and you have a GPU with at least 12 GB VRAM. The main split is output: docTR returns words and lines only, while olmOCR returns Markdown.

docTRmindee/doctrolmOCRallenai/olmocr
TypeOpen sourceOpen source
Price1 credit / page2 credits / page
Per 1,000 pages$1.00$2.00
Typical speed0.9 s / page1.5 s / page
Best forWord-level OCR with positionsBulk PDF to text for datasets
InputsPDF, imagesPDF, images
LanguagesMainly Latin scriptsMainly English
Max pages per request5001,000
TablesNo✓ Yes
HandwritingNo✓ Yes
MathNo✓ Yes
Bounding boxes✓ YesNo
Confidence✓ YesNo
FormsNoNo
MultilingualNoNo
On OCRRouterAvailableAvailable

Prices are what you pay on OCRRouter. Speed is the provider's typical figure, not a benchmark we ran.

Which to choose

Choose docTR if

  • You need word-level text with coordinates, exported as a nested page, block, line and word structure in JSON.
  • You can run on CPU or an NVIDIA GPU, with ready Docker images (GPU images need CUDA 12.2 or newer on the host).
  • You want to choose your own detection and recognition architectures, with straight or rotated boxes, and train your own models in Python.

Choose olmOCR if

  • You need PDFs or images converted to Markdown, with equations, tables and handwriting handled and headers and footers stripped in reading order.
  • You process pages at scale: self-hosting costs under $200 per million pages, per Ai2, or you can call hosted olmOCR-2-7B on DeepInfra at $0.09 input / $0.19 output per million tokens.
  • You want a model that scores 82.4 on olmOCR-Bench, above Marker (76.1), MinerU 2.5.4 (75.2) and Mistral OCR (72.0) in the same table, with weights, training data and code all released.

Key differences

docTRolmOCR
OutputJSON, plain text and bounding boxes. Words and lines only.Markdown and JSON.
Tables and formulasNo table, formula or Markdown output.Handles equations, tables and handwriting.
HardwareCPU or NVIDIA GPU. GPU Docker images need CUDA 12.2 or newer on the host.NVIDIA GPU with at least 12 GB VRAM and 30 GB free disk. Not for CPU-only machines.
How you run itLocal Python library on PyTorch, with Docker images.Self-host with vLLM on a GPU, or call third-party hosted endpoints. Hard to install into an existing Python environment, per the README.
PriceFree and self-hosted. You pay for compute.Self-hosted under $200 per million pages, per Ai2. DeepInfra hosted: $0.09 input / $0.19 output per million tokens.
BenchmarkNot published82.4 on olmOCR-Bench (v0.4.0), reported by the authors.
Known failureSplit-crop merging misjoins readings across repeated characters (issue #2229). Cropping images gives poorer results (issue #2007).Out of memory on a 12 GB GPU (issue #424). Can get stuck on the last few pages (issue #433). Image bounding box coordinates are unreliable (issue #437).

Sources

What each one is

docTR

Open-source OCR library from Mindee with separate text detection and recognition models.

docTR details

olmOCR

Open-source vision model from Ai2 (often searched as olm ocr) that turns PDFs into clean, reading-order text. Latest release: olmOCR 2.

olmOCR details

Try both on your own file

Run the file once with each model and compare the output.

PDF, PNG, JPG, WebP, HEIC. Up to 20 MB each, 10 files.No file?

Use one, fall back to the other

{"model": "mindee/doctr","fallbacks": ["allenai/olmocr"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

docTR alternativesolmOCR alternativesBest OCR models in 2026