Google Document AI vs docTR
Pick docTR if you want to run OCR yourself: it is Apache-2.0, runs in Python on CPU or an NVIDIA GPU, and returns words, lines and coordinates for your own extraction code. Pick Google Document AI if you want a hosted API on Google Cloud with per-page pricing, batch jobs and RAG chunking. Neither is a good fit for complex tables: docTR returns no table structure, and Document AI scored 64.6% on RD-TableBench.
Google Document AIgoogle/document-ai | docTRmindee/doctr | |
|---|---|---|
| Type | OCR API | Open source |
| Price | 10 credits / page | 1 credit / page |
| Per 1,000 pages | $10.00 | $1.00 |
| Typical speed | 1.4 s / page | 0.9 s / page |
| Best for | Multilingual scans | Word-level OCR with positions |
| Inputs | PDF, images | PDF, images |
| Languages | 200+ languages | Mainly Latin scripts |
| Max pages per request | 500 | 500 |
| Tables | ✓ Yes | No |
| Handwriting | ✓ Yes | No |
| Math | No | No |
| Bounding boxes | ✓ Yes | ✓ Yes |
| Confidence | ✓ Yes | ✓ Yes |
| Forms | ✓ Yes | 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 Google Document AI if
- You want a managed API on Google Cloud: Enterprise Document OCR costs $1.50 per 1,000 pages, $0.60 above 5M pages a month, and the first 1,000 pages are free.
- You build RAG pipelines: Layout Parser includes chunking at $10 per 1,000 pages.
- You process large batches: batch requests take up to 500 pages.
Choose docTR if
- You want to self-host under Apache-2.0 and pay only for compute, on CPU or NVIDIA GPU, with ready Docker images.
- You need word-level output: JSON with a nested page, block, line and word structure and coordinates, with straight or rotated boxes.
- You train or swap models: you can choose the detection and recognition architectures, and a key information extraction predictor is included.
Key differences
| Google Document AI | docTR | |
|---|---|---|
| How you run it | Hosted API on Google Cloud | Python library on PyTorch, run locally, with Docker images |
| Licence | Proprietary | Apache-2.0 |
| Price | Enterprise Document OCR $1.50 per 1,000 pages ($0.60 above 5M/month, first 1,000 free); Layout Parser $10; Form Parser $30 per 1,000 pages | Free, self-hosted (you pay for compute) |
| Output formats | JSON, plain text, bounding boxes, chunks | JSON, plain text, bounding boxes. No table, formula or Markdown output |
| Request limits | Online requests up to 15 pages (30 in imageless mode); batch up to 500 pages; Form Parser batch up to 100 pages | Not published |
| Tables | 64.6% on RD-TableBench (independent), behind Azure and Textract | No table structure extraction |
| Known failure modes | Long PDFs in one synchronous call do not fit the online page limit | Split-crop merging can misjoin readings across repeated characters (issue #2229); cropped images give poorer results (issue #2007); ONNX export of MASTER truncates decoding steps (issue #2224) |
Sources
What each one is
Google Document AI
Google Cloud OCR with layout parsing and specialised processors.
Google Document AI detailsdocTR
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.
Use one, fall back to the other
{"model": "google/document-ai","fallbacks": ["mindee/doctr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Google Document AI alternativesdocTR alternativesBest OCR models in 2026