docTR vs Chandra
Pick docTR if you want word-level text with coordinates from a Python library you run yourself, for example on invoices and receipts that feed your own extraction code. Pick Chandra if you need whole pages turned into Markdown, HTML or JSON with tables, forms and math, especially for multilingual scans or RAG pipelines. The main split is output: docTR returns words and lines only, Chandra returns structured documents.
docTRmindee/doctr | Chandradatalab/chandra | |
|---|---|---|
| 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 | 2.0 s / page |
| Best for | Word-level OCR with positions | Complex layouts and handwriting |
| Inputs | PDF, images | PDF, images |
| Languages | Mainly Latin scripts | 40+ languages |
| Max pages per request | 500 | 500 |
| Tables | No | ✓ Yes |
| Handwriting | No | ✓ Yes |
| Math | No | ✓ Yes |
| Bounding boxes | ✓ Yes | ✓ Yes |
| Confidence | ✓ Yes | No |
| Forms | No | ✓ Yes |
| Multilingual | No | ✓ Yes |
| 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 words, lines and blocks with coordinates as nested JSON, and nothing more.
- You want a plain Apache-2.0 library with no revenue cap, free to self-host on CPU or an NVIDIA GPU.
- You train or swap your own models, with a choice of detection and recognition architectures and straight or rotated boxes.
Choose Chandra if
- You need PDF to Markdown, HTML or JSON for RAG, including tables, forms and math, which docTR does not output.
- You process multilingual scans: Chandra 2 averages 77.8% across 43 languages in the authors' benchmark.
- You want a hosted option: the Datalab API costs $1, $3 or $7.50 per 1,000 pages, with a free tier of $20 per month.
Key differences
| docTR | Chandra | |
|---|---|---|
| What it is | Two-stage text detection and recognition library from Mindee, run in Python on PyTorch | Vision-language model from Datalab that converts pages to Markdown, HTML or JSON with layout |
| Licence | Apache-2.0 | Code Apache-2.0; weights modified OpenRAIL-M, free under $2M funding or revenue, commercial licence needed above that |
| How you run it | Local library with Docker images; GPU images need CUDA 12.2 or newer on the host | Self-host with vLLM or Hugging Face on one NVIDIA GPU, or use the hosted Datalab API |
| Price | Free, self-hosted; you pay for compute | Self-hosted free within licence terms; hosted API $1, $3 or $7.50 per 1,000 pages |
| Output formats | JSON, plain text, bounding boxes. No table, formula or Markdown output | Markdown, HTML, JSON, bounding boxes with layout chunks and labels per block |
| Benchmark | Not published | olmOCR-bench overall 85.8 for Chandra 2, set by the authors |
| Known failure | Cropping images gives poorer results (issue #2007); split-crop merging misjoins repeated characters (issue #2229) | Token-loop hallucinations on some Russian and Kazakh scans (issue #51); weak on Urdu (43.2%) and Old Scans (51.1 on olmOCR-bench) |
Sources
- docTR GitHub README
- docTR documentation
- Issue #2007
- Chandra GitHub README
- Datalab pricing
- GitHub issue #51 token loops
What each one is
docTR
Open-source OCR library from Mindee with separate text detection and recognition models.
docTR detailsChandra
Datalab's OCR model that keeps layout and handles forms, tables and handwriting.
Chandra 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": ["datalab/chandra"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
docTR alternativesChandra alternativesBest OCR models in 2026