OCRRouter

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-aidocTRmindee/doctr
TypeOCR APIOpen source
Price10 credits / page1 credit / page
Per 1,000 pages$10.00$1.00
Typical speed1.4 s / page0.9 s / page
Best forMultilingual scansWord-level OCR with positions
InputsPDF, imagesPDF, images
Languages200+ languagesMainly Latin scripts
Max pages per request500500
Tables✓ YesNo
Handwriting✓ YesNo
MathNoNo
Bounding boxes✓ Yes✓ Yes
Confidence✓ Yes✓ Yes
Forms✓ YesNo
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 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 AIdocTR
How you run itHosted API on Google CloudPython library on PyTorch, run locally, with Docker images
LicenceProprietaryApache-2.0
PriceEnterprise 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 pagesFree, self-hosted (you pay for compute)
Output formatsJSON, plain text, bounding boxes, chunksJSON, plain text, bounding boxes. No table, formula or Markdown output
Request limitsOnline requests up to 15 pages (30 in imageless mode); batch up to 500 pages; Form Parser batch up to 100 pagesNot published
Tables64.6% on RD-TableBench (independent), behind Azure and TextractNo table structure extraction
Known failure modesLong PDFs in one synchronous call do not fit the online page limitSplit-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 details

docTR

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

docTR 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": "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