Unlimited OCR vs TrOCR
Pick Unlimited OCR to parse whole multi-page documents such as long reports and books into Markdown with bounding boxes. Pick TrOCR to read single cropped text lines, especially English handwriting, or to fine-tune a recognizer on your own line images. The main split is scope: Unlimited OCR reads pages, TrOCR reads one line and needs a separate line detector in front.
Unlimited OCRbaidu/unlimited-ocr | TrOCRmicrosoft/trocr | |
|---|---|---|
| Type | Open source | Open source |
| Price | 2 credits / page | 1 credit / page |
| Per 1,000 pages | $2.00 | $1.00 |
| Typical speed | 1.2 s / page | 1.2 s / page |
| Best for | Books and very long documents | Handwritten text lines |
| Inputs | PDF, images | images |
| Languages | 30+ languages | English |
| Max pages per request | 1,000 | 100 |
| Tables | ✓ Yes | No |
| Handwriting | No | ✓ Yes |
| Math | ✓ Yes | No |
| Bounding boxes | ✓ Yes | No |
| Confidence | No | No |
| Forms | No | No |
| Multilingual | ✓ Yes | 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 Unlimited OCR if
- It parses 40+ pages in a single forward pass, so long reports and books go through in one request.
- It outputs Markdown, plain text and bounding boxes, with block types alongside the text, which suits layout-aware extraction and bulk PDF to text for RAG.
- Baidu reports 77.1 on MarathonDocBench for Unlimited OCR 2 against 33.7 for the next model, and Baidu Cloud offers a hosted endpoint if you do not want to run the GPU yourself.
Choose TrOCR if
- It reports a 2.89 character error rate on the IAM handwriting set with the large model, so it fits English handwritten lines.
- It has separate checkpoints fine-tuned for handwritten (IAM), printed (SROIE) and scene text, and it is a good base for fine-tuning on custom line images.
- It loads in a few lines with Hugging Face transformers, and at 334M (base) or 558M (large) parameters it is far smaller than a 3B document parser.
Key differences
| Unlimited OCR | TrOCR | |
|---|---|---|
| Input scope | Multi-page documents and PDFs, 40+ pages in one pass | Single text-line images only, so you need a separate line detector |
| Output | Markdown, plain text and bounding boxes | Plain text only, no layout, table or page-level output |
| Licence | MIT | MIT (microsoft/unilm repository) |
| How you run it | Self-host with vLLM, SGLang or transformers, or use the hosted endpoint in Baidu Cloud's OCR product | Run locally through Hugging Face transformers |
| Size and hardware | 3B total parameters; NVIDIA GPU with CUDA 12.9 or 13.0; version 2 runs out of memory on 12 GB GPUs under SGLang | Base 334M, large 558M; slow on CPU versus CRNN recognizers |
| Languages | Not published | Released checkpoints are English-focused; other languages need fine-tuning |
| Known failures | Text repetition and looping, hallucinated text, bbox coordinate loops under SGLang on GB10 GPUs, and little bold or italic formatting kept | Cannot read full pages, tables or layout |
Sources
- Hugging Face model card
- MarkTechPost on Unlimited OCR 2
- Issue #116 OOM on 12 GB
- TrOCR paper (arXiv 2109.10282)
- trocr-large-handwritten model card
What each one is
Unlimited OCR
Open-source model from Baidu that reads hundreds of pages in one pass with flat memory use.
Unlimited OCR detailsTrOCR
Transformer text recognition model. Reads single text lines, including handwriting.
TrOCR 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": "baidu/unlimited-ocr","fallbacks": ["microsoft/trocr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Unlimited OCR alternativesTrOCR alternativesBest OCR models in 2026