OCRRouter

Qianfan OCR vs TrOCR

Pick Qianfan OCR when you need to parse whole pages or PDFs with tables, formulas and many languages. Pick TrOCR when you already have cropped single text-line images, mostly English handwriting or receipt lines, and want a small recognizer to run or fine-tune. The main split is scope: Qianfan OCR reads full documents, while TrOCR only reads one line at a time.

Qianfan OCRbaidu/qianfan-ocrTrOCRmicrosoft/trocr
TypeOCR APIOpen source
Price2 credits / page1 credit / page
Per 1,000 pages$2.00$1.00
Typical speed2.0 s / page1.2 s / page
Best forChinese documentsHandwritten text lines
InputsPDF, imagesimages
LanguagesChinese, English and moreEnglish
Max pages per request200100
Tables✓ YesNo
Handwriting✓ Yes✓ Yes
Math✓ YesNo
Bounding boxesNoNo
ConfidenceNoNo
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 parses full documents and returns Markdown, JSON, HTML, LaTeX and bounding boxes, so you need no separate line detector.
  • It covers 192 languages, handwriting and scene text, and scores 93.12 on OmniDocBench v1.5.
  • It handles tables, formulas and key information extraction under the Apache-2.0 license, which allows commercial use.

Choose TrOCR if

  • It is much smaller, at 334M parameters for base and 558M for large, against 4B for Qianfan OCR.
  • It reports a 2.89 character error rate on the IAM handwriting set with the large model, and has separate checkpoints for handwritten, printed (SROIE) and scene text.
  • It loads in a few lines with Hugging Face transformers, is MIT licensed, and suits fine-tuning on your own line images.

Key differences

Qianfan OCRTrOCR
Input it readsFull document pages, with layout, tables and formulasSingle text-line images only, so you need a separate line detector
Output formatsMarkdown, JSON, HTML, LaTeX, bounding boxesPlain text
Languages192 languages, plus handwriting and scene textReleased checkpoints are English-focused; other languages need fine-tuning
Model size4B (Qwen3-4B language model)Base 334M, large 558M
How you run itSelf-host the open weights (benchmarked on one A100 with vLLM) or use the Baidu Qianfan platformRun locally through Hugging Face transformers
LicenceApache-2.0MIT (microsoft/unilm repository)
Benchmark93.12 on OmniDocBench v1.5; 79.8 on olmOCR-Bench; 880 on OCRBench2.89 CER on IAM handwriting (TrOCR-large)
Known weakness1.024 pages per second on an A100 even with W8A8; thinking mode can emit up to 16,384 tokens; not for CPU-only deploymentSlow versus CRNN recognizers on CPU; no layout, table or page-level output

Sources

What each one is

Qianfan OCR

Baidu's OCR-tuned vision model. Strong on Chinese documents and tables.

Qianfan OCR details

TrOCR

Transformer text recognition model. Reads single text lines, including handwriting.

TrOCR 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": ["microsoft/trocr"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Qianfan OCR alternativesTrOCR alternativesBest OCR models in 2026