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/doctr | olmOCRallenai/olmocr | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 2 credits / page |
| Per 1,000 pages | $1.00 | $2.00 |
| Typical speed | 0.9 s / page | 1.5 s / page |
| Best for | Word-level OCR with positions | Bulk PDF to text for datasets |
| Inputs | PDF, images | PDF, images |
| Languages | Mainly Latin scripts | Mainly English |
| Max pages per request | 500 | 1,000 |
| Tables | No | ✓ Yes |
| Handwriting | No | ✓ Yes |
| Math | No | ✓ Yes |
| Bounding boxes | ✓ Yes | No |
| Confidence | ✓ Yes | No |
| Forms | No | No |
| Multilingual | No | No |
| On OCRRouter | Available | Available |
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
| docTR | olmOCR | |
|---|---|---|
| Output | JSON, plain text and bounding boxes. Words and lines only. | Markdown and JSON. |
| Tables and formulas | No table, formula or Markdown output. | Handles equations, tables and handwriting. |
| Hardware | CPU 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 it | Local 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. |
| Price | Free 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. |
| Benchmark | Not published | 82.4 on olmOCR-Bench (v0.4.0), reported by the authors. |
| Known failure | Split-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 detailsolmOCR
Open-source vision model from Ai2 (often searched as olm ocr) that turns PDFs into clean, reading-order text. Latest release: olmOCR 2.
olmOCR detailsTry both on your own file
Run the file once with each model and compare the output.
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