OCRRouter

docTR vs Phi-4-multimodal

Pick docTR for word-level OCR with coordinates on invoices and receipts, especially if your team trains its own models in Python. Pick Phi-4-multimodal for English document Q&A, where it scores DocVQA 93.2, or when audio and images go through one model. The main split is output: docTR gives words, lines and boxes, while Phi-4-multimodal gives text, Markdown or JSON with no coordinates.

docTRmindee/doctrPhi-4-multimodalmicrosoft/phi-4-multimodal
TypeOpen sourceVision model
Price1 credit / page2 credits / page
Per 1,000 pages$1.00$2.00
Typical speed0.9 s / page2.5 s / page
Best forWord-level OCR with positionsSmall model for OCR and questions
InputsPDF, imagesimages
LanguagesMainly Latin scriptsEnglish for vision
Max pages per request500500
TablesNo✓ Yes
HandwritingNoNo
MathNo✓ Yes
Bounding boxes✓ YesNo
Confidence✓ YesNo
FormsNoNo
MultilingualNoNo
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 docTR if

  • You need word-level OCR with a nested page, block, line and word structure and coordinates exported as JSON.
  • You want to choose your own detection and recognition architectures, with straight or rotated boxes, and train your own models.
  • You run on CPU or NVIDIA GPU and want ready Docker images under Apache-2.0, plus a key information extraction predictor.

Choose Phi-4-multimodal if

  • You need to ask questions about English documents, where Microsoft reports DocVQA 93.2 and OCRBench 84.4.
  • You want Markdown or JSON output from a single 5.6B model with a 128K token context.
  • You have a pipeline that mixes audio and image input, or you want the MIT licence and the option to use Azure AI Foundry instead of self-hosting.

Key differences

docTRPhi-4-multimodal
What it isTwo-stage text detection and recognition OCR library from Mindee, built on PyTorch5.6B open-weight multimodal model from Microsoft that takes text, image and audio
LicenceApache-2.0MIT
How you run itLocal Python library, with Docker imagesSelf-host, or use Azure AI Foundry
Output formatsJSON, plain text, bounding boxesPlain text, Markdown, JSON
Coordinates and layoutWord, line and block boxes with coordinatesNot suited to jobs needing coordinates or layout
HardwareCPU or NVIDIA GPU; GPU Docker images need CUDA 12.2 or newer on the hostFlash attention, tested on A100, A6000 and H100; V100 and older need eager attention
Known failureNo table, formula or Markdown output. Cropping images gives poorer results (issue #2007).Vision is English only and performance drops in other languages. Long chats can produce repetitive or inconsistent output.

Sources

What each one is

docTR

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

docTR details

Phi-4-multimodal

Microsoft's 5.6B text, vision and audio model (February 2025). Scores 84.4 on OCRBench per its model card.

Phi-4-multimodal 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": "mindee/doctr","fallbacks": ["microsoft/phi-4-multimodal"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

docTR alternativesPhi-4-multimodal alternativesBest OCR models in 2026