Qianfan OCR vs docTR
Pick Qianfan OCR when you need full document parsing: Markdown, tables, formulas, handwriting, or 192 languages, and you have a GPU. Pick docTR when you need word-level text and coordinates from a Python library, including on CPU, and plan to build your own extraction on top. The main split is that Qianfan OCR is a 4B end-to-end model that outputs structured documents, while docTR is a two-stage detector and recognizer that returns words and lines only.
Qianfan OCRbaidu/qianfan-ocr | docTRmindee/doctr | |
|---|---|---|
| Type | OCR API | Open source |
| Price | 2 credits / page | 1 credit / page |
| Per 1,000 pages | $2.00 | $1.00 |
| Typical speed | 2.0 s / page | 0.9 s / page |
| Best for | Chinese documents | Word-level OCR with positions |
| Inputs | PDF, images | PDF, images |
| Languages | Chinese, English and more | Mainly Latin scripts |
| Max pages per request | 200 | 500 |
| Tables | ✓ Yes | No |
| Handwriting | ✓ Yes | No |
| Math | ✓ Yes | No |
| Bounding boxes | No | ✓ Yes |
| Confidence | No | ✓ Yes |
| 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 Qianfan OCR if
- It outputs Markdown, JSON, HTML, LaTeX and bounding boxes, so tables and formulas come out as structure.
- It covers 192 languages, handwriting and scene text, and scores 93.12 on OmniDocBench v1.5 per its authors.
- It can be self-hosted under Apache-2.0 or used through the Baidu Qianfan platform if you prefer hosted access.
Choose docTR if
- It runs on CPU or an NVIDIA GPU, so you can deploy without a large GPU.
- It gives a nested page, block, line and word structure with coordinates as JSON, with a choice of detection and recognition architectures and straight or rotated boxes.
- It suits Python ML teams who want to train their own models, or feed invoices and receipts into custom extraction with its key information extraction predictor.
Key differences
| Qianfan OCR | docTR | |
|---|---|---|
| Model type | 4B end-to-end document parsing model (Qwen3-4B language model) | Two-stage text detection and recognition library from Mindee |
| Output formats | Markdown, JSON, HTML, LaTeX, bounding boxes | JSON, plain text, bounding boxes. No table, formula or Markdown output |
| Hardware | Benchmarked on one NVIDIA A100 with vLLM; no minimum VRAM stated. Not suited to CPU-only deployment | CPU or NVIDIA GPU; GPU Docker images need CUDA 12.2 or newer on the host |
| How you run it | Open weights on Hugging Face, or the Baidu Qianfan platform | Python library on PyTorch, with Docker images and a Hugging Face Spaces demo |
| Licence and price | Apache-2.0, free self-hosted (you pay for compute) | Apache-2.0, free self-hosted (you pay for compute) |
| Benchmarks | OmniDocBench v1.5 93.12, olmOCR-Bench 79.8, OCRBench 880 (author-reported) | Not published |
| Known issues | 1.024 pages per second on an A100 even with W8A8; thinking mode can emit up to 16,384 tokens, adding latency | Split-crop merging misjoins readings across repeated characters (issue #2229); cropped images give poorer results (issue #2007); MASTER ONNX export truncates decoding steps (issue #2224) |
Sources
What each one is
Qianfan OCR
Baidu's OCR-tuned vision model. Strong on Chinese documents and tables.
Qianfan OCR detailsdocTR
Open-source OCR library from Mindee with separate text detection and recognition models.
docTR 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/qianfan-ocr","fallbacks": ["mindee/doctr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Qianfan OCR alternativesdocTR alternativesBest OCR models in 2026