OCRRouter

Google Document AI vs Surya

Pick Surya if you want to run OCR yourself, for free, on your own hardware, and need layout, reading order and bounding boxes in 90+ languages. Pick Google Document AI if you want a managed API at $1.50 per 1,000 pages with batch jobs up to 500 pages and RAG chunking. The main split is deployment: Document AI is a paid hosted service, Surya is a self-hosted model you must run yourself.

Google Document AIgoogle/document-aiSuryadatalab/surya
TypeOCR APIOpen source
Price10 credits / page2 credits / page
Per 1,000 pages$10.00$2.00
Typical speed1.4 s / page1.5 s / page
Best forMultilingual scansLayout and line-level OCR
InputsPDF, imagesPDF, images
Languages200+ languages90+ languages
Max pages per request500500
Tables✓ Yes✓ Yes
Handwriting✓ YesNo
MathNoNo
Bounding boxes✓ Yes✓ Yes
Confidence✓ YesNo
Forms✓ YesNo
Multilingual✓ Yes✓ Yes
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

  • It is a hosted API, so you run no GPU or inference server and pay $1.50 per 1,000 pages, dropping to $0.60 above 5M pages a month.
  • Layout Parser includes chunking for RAG at $10 per 1,000 pages.
  • Batch requests take up to 500 pages, which suits bulk OCR on Google Cloud.

Choose Surya if

  • It is free to self-host, with Apache-2.0 code and weights that are free for research, personal use and companies under $5M funding or revenue.
  • It runs on a laptop CPU or Apple Silicon through llama.cpp, with peak memory of about 4.3-5.9 GB on an M4 Max.
  • One 689M-parameter model returns layout labels, reading order, OCR, HTML tables and KaTeX math with per-block bounding boxes.

Key differences

Google Document AISurya
How you run itHosted API on Google CloudSelf-host; needs a separate vLLM or llama.cpp inference server
LicenceProprietaryCode Apache-2.0; weights under modified AI Pubs Open Rail-M, with a commercial licence needed above $5M revenue or funding
PriceOCR $1.50 per 1,000 pages ($0.60 above 5M a month, first 1,000 free); Layout Parser $10; Form Parser $30 per 1,000 pagesFree; you pay for compute
Request limitsOnline requests up to 15 pages (30 in imageless mode); batch up to 500 pages; Form Parser batch up to 100 pagesNot published
Output formatsJSON, plain text, bounding boxes, chunksJSON, HTML, LaTeX, bounding boxes, plain text
Table accuracy64.6% on RD-TableBench (independent), behind Azure and TextractNot published on RD-TableBench; 58.1 on multilingual tables (authors); Surya 2.5 table output lacks row/column geometry
Benchmarks and speedNot published beyond the table score83.7% on olmOCR-bench (authors); 4.52 pages/s at 192 DPI on one H100 with vLLM; 0.198 pages/s on an M4 Max with llama.cpp at 96 DPI

Sources

What each one is

Google Document AI

Google Cloud OCR with layout parsing and specialised processors.

Google Document AI details

Surya

Open-source OCR toolkit with line detection, layout analysis, reading order and tables.

Surya 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": ["datalab/surya"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Google Document AI alternativesSurya alternativesBest OCR models in 2026