GPT vs docTR
Pick GPT when you need handwriting, custom JSON extraction with reasoning, or document question answering through a hosted API. Pick docTR when you need word-level text with coordinates, run it on your own hardware, and want a free Apache-2.0 library. The main split is that GPT understands and extracts, while docTR only returns words, lines and boxes.
GPTopenai/gpt | docTRmindee/doctr | |
|---|---|---|
| Type | Vision model | Open source |
| Price | 11 credits / page | 1 credit / page |
| Per 1,000 pages | $11.00 | $1.00 |
| Typical speed | 2.4 s / page | 0.9 s / page |
| Best for | Messy scans, custom instructions | Word-level OCR with positions |
| Inputs | PDF, images | PDF, images |
| Languages | 50+ languages | Mainly Latin scripts |
| Max pages per request | 100 | 500 |
| Tables | ✓ Yes | No |
| Handwriting | ✓ Yes | No |
| Math | ✓ Yes | No |
| Bounding boxes | No | ✓ Yes |
| Confidence | No | ✓ Yes |
| 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 GPT if
- It handles messy handwriting: an HN user reported about 5% errors on cursive versus about 30% for Mistral OCR.
- You can prompt it to return Markdown, JSON or plain text, which suits extraction into a custom JSON schema and document question answering.
- It is a hosted API that takes files up to 50 MB per request, with no models to host or train.
Choose docTR if
- It returns a nested page, block, line and word structure with coordinates as JSON, which GPT's standard response does not give you.
- It is Apache-2.0 and free to self-host, so you pay only for compute and keep documents on your own machines.
- You can pick the detection and recognition architectures, use straight or rotated boxes, and train your own models in Python.
Key differences
| GPT | docTR | |
|---|---|---|
| Licence | Proprietary | Apache-2.0 |
| How you run it | Hosted OpenAI API | Python library on PyTorch, with Docker images; CPU or NVIDIA GPU (GPU images need CUDA 12.2 or newer on the host) |
| Price | Token-based per model; PDF page images add input tokens, so cost per page is not fixed | Free, self-hosted; you pay for compute |
| Output formats | Markdown, JSON, plain text | JSON, plain text, bounding boxes. No Markdown, table or formula output |
| Coordinates | No bounding boxes or confidence scores in the standard response | Word, line and block coordinates, with straight or rotated boxes |
| OmniDocBench overall | 85.50 on v1.5 and 86.59 on v1.6 (GPT-5.2, independent) | Not published |
| Known failure | Scored below Gemini 3 Pro (90.33) on OmniDocBench v1.5 in the same paper | Cropped images give poorer results (issue #2007); split-crop merging can misjoin readings across repeated characters (issue #2229) |
Sources
- OpenAI file inputs docs
- OmniDocBench leaderboard
- HN Mistral OCR thread
- docTR GitHub README
- Issue #2007
- Issue #2229
What each one is
docTR
Open-source OCR library from Mindee with separate text detection and recognition models.
docTR detailsTry 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": "openai/gpt","fallbacks": ["mindee/doctr"],"file_url": "https://example.com/document.pdf"}