docTR vs Kraken
Pick docTR for modern business documents such as invoices and receipts, where you want word-level text with coordinates from a Python library, and for a Windows-friendly setup. Pick Kraken for historical manuscripts, early prints and non-Latin scripts such as Arabic and Hebrew, where you can train layout and recognition on your own material. The main split is the material: docTR targets modern documents, Kraken targets historical and right-to-left text.
docTRmindee/doctr | Krakenkraken/kraken | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 1 credit / page |
| Per 1,000 pages | $1.00 | $1.00 |
| Typical speed | 0.9 s / page | 1.5 s / page |
| Best for | Word-level OCR with positions | Historical documents and manuscripts |
| Inputs | PDF, images | images |
| Languages | Mainly Latin scripts | Many scripts, incl. right-to-left |
| Max pages per request | 500 | 500 |
| Tables | No | No |
| Handwriting | No | ✓ Yes |
| Math | No | No |
| Bounding boxes | ✓ Yes | ✓ Yes |
| Confidence | ✓ Yes | No |
| Forms | No | No |
| 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 word-level OCR with coordinates, exported as a nested page, block, line and word JSON structure.
- You are processing invoices or receipts and feeding the text into your own extraction step, with a key information extraction predictor available.
- You want a choice of detection and recognition architectures, with straight or rotated boxes, plus ready Docker images (GPU images need CUDA 12.2 or newer on the host).
Choose Kraken if
- You work with historical manuscripts, early prints or other historical material.
- You need right-to-left, BiDi or top-to-bottom scripts such as Arabic and Hebrew.
- You need ALTO, PageXML, abbyyXML or hOCR output for digital humanities tools, and you are ready to train layout analysis, reading order and recognition on your own material.
Key differences
| docTR | Kraken | |
|---|---|---|
| Target material | Word-level OCR for invoices, receipts and similar documents | Historical documents and non-Latin scripts |
| Licence and price | Apache-2.0, free, self-hosted (you pay for compute) | Apache-2.0, free, self-hosted (you pay for compute) |
| Platform | Python on PyTorch; CPU or NVIDIA GPU; Docker images, GPU ones need CUDA 12.2 or newer on the host | Linux or macOS only, x64 or ARM, Python 3.10 to 3.13; no Windows support |
| Output formats | JSON, plain text, bounding boxes | ALTO, PageXML, hOCR, plain text, bounding boxes |
| Training | Choice of detection and recognition architectures; suited to Python ML teams training their own models | Trainable layout analysis, reading order and recognition; usually needs training on your own material for good accuracy |
| Known failure | Split-crop merging misjoins readings across repeated characters (issue #2229); cropping images leads to poorer results (issue #2007) | Install can fail with a dependency conflict (issue #816); learned line order is lost in segmentation and text output (issue #820) |
| Benchmarks | Not published | Not published |
Sources
What each one is
docTR
Open-source OCR library from Mindee with separate text detection and recognition models.
docTR detailsKraken
OCR engine for historical documents and manuscripts, with trainable models for unusual scripts.
Kraken 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": ["kraken/kraken"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
docTR alternativesKraken alternativesBest OCR models in 2026