docTR vs Hunyuan OCR
Pick docTR if you want word-level text with coordinates from a Python library under Apache-2.0, for example invoices and receipts that feed your own extraction code. Pick Hunyuan OCR if you need Markdown, HTML, LaTeX or JSON output, photo and scene text, or translation, and your users are outside the EU, UK and South Korea. The main split is output: docTR returns words and lines only, while Hunyuan OCR parses whole documents.
docTRmindee/doctr | Hunyuan OCRtencent/hunyuan-ocr | |
|---|---|---|
| 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 | Chinese documents and photos |
| Inputs | PDF, images | PDF, images |
| Languages | Mainly Latin scripts | 100+ languages |
| Max pages per request | 500 | 500 |
| Tables | No | ✓ Yes |
| Handwriting | No | No |
| Math | No | ✓ Yes |
| 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
- The Apache-2.0 licence has no regional exclusions and no user cap.
- It exports a nested page, block, line and word structure with coordinates as JSON, so you can build custom extraction on top.
- You can choose detection and recognition architectures, use straight or rotated boxes, and train your own models in Python.
Choose Hunyuan OCR if
- It outputs Markdown, HTML, LaTeX, JSON and plain text, and it handles document parsing that docTR does not offer.
- One model of about 1B parameters covers parsing, text spotting, information extraction and image translation.
- It handles low-resource and ancient scripts and images up to 4K, and the llama.cpp GGUF path runs on a laptop.
Key differences
| docTR | Hunyuan OCR | |
|---|---|---|
| Licence | Apache-2.0 | Tencent Hunyuan Community License. It excludes the EU, UK and South Korea, and needs a separate licence above 100M monthly active users. |
| Model type | Two-stage text detection and recognition library from Mindee, built on PyTorch | Lightweight end-to-end OCR vision-language model, about 1B parameters |
| How you run it | Local Python library, with Docker images. GPU images need CUDA 12.2 or newer on the host. | Self-hosted via vLLM, Transformers or llama.cpp. The unified vLLM setup recommends CUDA 13 and needs vLLM 0.25.1 or newer. |
| Output formats | JSON, plain text, bounding boxes. No table, formula or Markdown output. | Markdown, HTML, LaTeX, JSON, plain text, bounding boxes |
| Hardware | CPU or NVIDIA GPU | NVIDIA GPU with CUDA 13 recommended. llama.cpp GGUF path for CPU, consumer GPU or laptop. |
| Benchmark | Not published | ParseBench-2 overall 67.11 and ParseBench mean 63.86 (v1.5, independent). Text score 62.88 in public CI replay. |
| Known issues | Split-crop merging misjoins readings across repeated characters (issue #2229). Cropping images gives poorer results (issue #2007). ONNX export of MASTER truncates decoding steps (issue #2224). | An archived 1.0 note says Transformers and vLLM outputs differed in accuracy. |
Sources
What each one is
docTR
Open-source OCR library from Mindee with separate text detection and recognition models.
docTR detailsHunyuan OCR
Small end-to-end OCR model from Tencent covering parsing, extraction and photo translation.
Hunyuan OCR 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": ["tencent/hunyuan-ocr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
docTR alternativesHunyuan OCR alternativesBest OCR models in 2026