Qianfan OCR vs Docling
Pick Qianfan OCR when you need to parse scans, handwriting and scene text in many languages, with tables, formulas and key information extraction, and you have a GPU. Pick Docling when you ingest born-digital PDFs and Office files into a RAG pipeline and want structured JSON with layout, and it must run on CPU. The main split is model versus library: Qianfan OCR is a 4B end-to-end model, while Docling is a Python library whose scan accuracy depends on the OCR engine you plug in.
Qianfan OCRbaidu/qianfan-ocr | Doclingibm/docling | |
|---|---|---|
| Type | OCR API | Open source |
| Price | 2 credits / page | 2 credits / page |
| Per 1,000 pages | $2.00 | $2.00 |
| Typical speed | 2.0 s / page | 2.2 s / page |
| Best for | Chinese documents | Structured export for RAG |
| Inputs | PDF, images | PDF, images, DOCX |
| Languages | Chinese, English and more | Latin scripts, CJK |
| Max pages per request | 200 | 500 |
| Tables | ✓ Yes | ✓ Yes |
| Handwriting | ✓ Yes | No |
| Math | ✓ Yes | ✓ Yes |
| Bounding boxes | No | ✓ Yes |
| 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 Qianfan OCR if
- It scores 93.12 on OmniDocBench v1.5, the top end-to-end result in Baidu's table, while Docling has no published benchmark.
- It covers 192 languages, handwriting and scene text in a single model.
- It outputs Markdown, JSON, HTML, LaTeX and bounding boxes, which suits tables, formulas and key information extraction.
Choose Docling if
- It parses PDF, DOCX, PPTX, XLSX, HTML, EPUB, images, emails and XBRL through one API.
- It runs on CPU on macOS, Linux and Windows (x86_64 and arm64), with GPU as an optional speedup.
- Its lossless JSON export keeps layout, reading order and table structure, and it has LangChain and LlamaIndex integrations.
Key differences
| Qianfan OCR | Docling | |
|---|---|---|
| What it is | 4B end-to-end document parsing model from Baidu's Qianfan team (Qwen3-4B language model) | Python library from IBM Research that converts documents into a DoclingDocument and plugs in OCR engines and VLMs |
| Licence | Apache-2.0, commercial use allowed | MIT; individual models have their own licences |
| How you run it | Self-host weights from Hugging Face, or use the Baidu Qianfan platform | Self-hosted library, free; you pay for compute |
| Hardware | Benchmarked on one NVIDIA A100 with vLLM; not suited to CPU-only deployment | CPU works; GPU speeds up model stages |
| Output formats | Markdown, JSON, HTML, LaTeX, bounding boxes | Markdown, HTML, JSON, DocTags, plain text |
| Benchmarks | OmniDocBench v1.5 93.12, olmOCR-Bench 79.8, OCRBench 880 (author-reported) | Not published |
| Known failure | 1.024 pages per second on an A100 even with W8A8; thinking mode can emit up to 16,384 tokens | Version 2.143.1 drops words and numbers with full-page Tesseract OCR (issue #5254); neighbouring columns can merge on some layouts (issue #5132) |
Sources
- Qianfan-OCR model card
- Docling GitHub README
- Supported formats
- GraniteDocling model
- Issue #5254 OCR regression
- Issue #5132 reading order
What each one is
Qianfan OCR
Baidu's OCR-tuned vision model. Strong on Chinese documents and tables.
Qianfan 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": "baidu/qianfan-ocr","fallbacks": ["ibm/docling"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Qianfan OCR alternativesDocling alternativesBest OCR models in 2026