TrOCR vs Chandra
Pick Chandra for full pages and PDFs, tables, forms and non-English text. Pick TrOCR only when you already have cropped single text-line images, such as English handwriting or receipt lines, or want to fine-tune a recognizer. The main split is scope: TrOCR reads one line and needs your own line detector, while Chandra reads whole pages and returns layout.
TrOCRmicrosoft/trocr | Chandradatalab/chandra | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 2 credits / page |
| Per 1,000 pages | $1.00 | $2.00 |
| Typical speed | 1.2 s / page | 2.0 s / page |
| Best for | Handwritten text lines | Complex layouts and handwriting |
| Inputs | images | PDF, images |
| Languages | English | 40+ languages |
| Max pages per request | 100 | 500 |
| Tables | No | ✓ Yes |
| Handwriting | ✓ Yes | ✓ Yes |
| Math | No | ✓ Yes |
| Bounding boxes | No | ✓ Yes |
| Confidence | No | 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 TrOCR if
- You have English handwritten lines and want a model that reports 2.89 character error rate on IAM with the large checkpoint.
- You want to fine-tune a recognizer on your own line images, starting from separate handwritten (IAM), printed (SROIE) and scene text checkpoints.
- You want plain MIT licensing with no revenue or funding threshold, and a few lines of Hugging Face transformers code.
Choose Chandra if
- You need to convert full pages or PDFs to Markdown, HTML or JSON with bounding boxes, for example for RAG pipelines.
- Your documents have tables, forms or math, or are in many languages: Chandra 2 averages 77.8% across 43 languages.
- You want a hosted option: the Datalab API costs $1, $3 or $7.50 per 1,000 pages depending on mode, with $20/month of free usage.
Key differences
| TrOCR | Chandra | |
|---|---|---|
| Input scope | Single text-line images only; needs a separate line detector | Full pages with layout, tables, forms and math |
| Output | Plain text | Markdown, HTML, JSON and bounding boxes |
| Licence | MIT | Code Apache-2.0; weights modified OpenRAIL-M, free for research, personal use and companies under $2M funding/revenue |
| How you run it | Local library via Hugging Face transformers; base 334M or large 558M parameters | Self-host with vLLM or Hugging Face on a GPU (A100, L40S, RTX 4090/5090 presets), or use the hosted Datalab API |
| Price | Free, self-hosted; you pay for compute | Self-hosted free within licence terms; API $1, $3 or $7.50 per 1,000 pages |
| Languages | English-focused checkpoints; other languages need fine-tuning | 77.8% average over 43 languages; weak on Urdu (43.2%) and Sanskrit (51.1%) |
| Known failure | Slow for a single line on CPU versus CRNN recognizers | Token-loop hallucinations reported on some Russian/Kazakh scans; only 51.1 on old scans in olmOCR-bench |
Sources
- TrOCR paper (arXiv 2109.10282)
- trocr-large-handwritten model card
- Chandra GitHub README
- Datalab pricing
- GitHub issue #51 token loops
What each one is
TrOCR
Transformer text recognition model. Reads single text lines, including handwriting.
TrOCR 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.
PDF, PNG, JPG, WebP, HEIC. Up to 20 MB each, 10 files.No file?
Use one, fall back to the other
{"model": "microsoft/trocr","fallbacks": ["datalab/chandra"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
TrOCR vs SuryaTrOCR vs olmOCRolmOCR vs ChandraKraken vs ChandraChandra vs Tesseract.jsChandra vs Granite DoclingAmazon Textract vs TrOCRGLM-OCR vs Chandra
TrOCR alternativesChandra alternativesBest OCR models in 2026