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/doctr | Phi-4-multimodalmicrosoft/phi-4-multimodal | |
|---|---|---|
| Type | Open source | Vision model |
| Price | 1 credit / page | 2 credits / page |
| Per 1,000 pages | $1.00 | $2.00 |
| Typical speed | 0.9 s / page | 2.5 s / page |
| Best for | Word-level OCR with positions | Small model for OCR and questions |
| Inputs | PDF, images | images |
| Languages | Mainly Latin scripts | English for vision |
| Max pages per request | 500 | 500 |
| Tables | No | ✓ Yes |
| Handwriting | No | No |
| Math | No | ✓ Yes |
| Bounding boxes | ✓ Yes | No |
| Confidence | ✓ Yes | No |
| Forms | No | No |
| Multilingual | No | 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 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
| docTR | Phi-4-multimodal | |
|---|---|---|
| What it is | Two-stage text detection and recognition OCR library from Mindee, built on PyTorch | 5.6B open-weight multimodal model from Microsoft that takes text, image and audio |
| Licence | Apache-2.0 | MIT |
| How you run it | Local Python library, with Docker images | Self-host, or use Azure AI Foundry |
| Output formats | JSON, plain text, bounding boxes | Plain text, Markdown, JSON |
| Coordinates and layout | Word, line and block boxes with coordinates | Not suited to jobs needing coordinates or layout |
| Hardware | CPU or NVIDIA GPU; GPU Docker images need CUDA 12.2 or newer on the host | Flash attention, tested on A100, A6000 and H100; V100 and older need eager attention |
| Known failure | No 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 detailsPhi-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 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": "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