OCRRouter

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-ocrdocTRmindee/doctr
TypeOCR APIOpen source
Price2 credits / page1 credit / page
Per 1,000 pages$2.00$1.00
Typical speed2.0 s / page0.9 s / page
Best forChinese documentsWord-level OCR with positions
InputsPDF, imagesPDF, images
LanguagesChinese, English and moreMainly Latin scripts
Max pages per request200500
Tables✓ YesNo
Handwriting✓ YesNo
Math✓ YesNo
Bounding boxesNo✓ Yes
ConfidenceNo✓ Yes
FormsNoNo
Multilingual✓ YesNo
On OCRRouterAvailableAvailable

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 OCRdocTR
Model type4B end-to-end document parsing model (Qwen3-4B language model)Two-stage text detection and recognition library from Mindee
Output formatsMarkdown, JSON, HTML, LaTeX, bounding boxesJSON, plain text, bounding boxes. No table, formula or Markdown output
HardwareBenchmarked on one NVIDIA A100 with vLLM; no minimum VRAM stated. Not suited to CPU-only deploymentCPU or NVIDIA GPU; GPU Docker images need CUDA 12.2 or newer on the host
How you run itOpen weights on Hugging Face, or the Baidu Qianfan platformPython library on PyTorch, with Docker images and a Hugging Face Spaces demo
Licence and priceApache-2.0, free self-hosted (you pay for compute)Apache-2.0, free self-hosted (you pay for compute)
BenchmarksOmniDocBench v1.5 93.12, olmOCR-Bench 79.8, OCRBench 880 (author-reported)Not published
Known issues1.024 pages per second on an A100 even with W8A8; thinking mode can emit up to 16,384 tokens, adding latencySplit-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 details

docTR

Open-source OCR library from Mindee with separate text detection and recognition models.

docTR details

Try both on your own file

Run the file once with each model and compare the output.

PDF, PNG, JPG, WebP, HEIC. Up to 20 MB each, 10 files.No file?

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