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-ai | Suryadatalab/surya | |
|---|---|---|
| Type | OCR API | Open source |
| Price | 10 credits / page | 2 credits / page |
| Per 1,000 pages | $10.00 | $2.00 |
| Typical speed | 1.4 s / page | 1.5 s / page |
| Best for | Multilingual scans | Layout and line-level OCR |
| Inputs | PDF, images | PDF, images |
| Languages | 200+ languages | 90+ languages |
| Max pages per request | 500 | 500 |
| Tables | ✓ Yes | ✓ Yes |
| Handwriting | ✓ Yes | No |
| Math | No | No |
| Bounding boxes | ✓ Yes | ✓ Yes |
| Confidence | ✓ Yes | No |
| Forms | ✓ Yes | No |
| Multilingual | ✓ Yes | ✓ Yes |
| 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
- 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 AI | Surya | |
|---|---|---|
| How you run it | Hosted API on Google Cloud | Self-host; needs a separate vLLM or llama.cpp inference server |
| Licence | Proprietary | Code Apache-2.0; weights under modified AI Pubs Open Rail-M, with a commercial licence needed above $5M revenue or funding |
| Price | OCR $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 pages | Free; you pay for compute |
| 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 |
| Output formats | JSON, plain text, bounding boxes, chunks | JSON, HTML, LaTeX, bounding boxes, plain text |
| Table accuracy | 64.6% on RD-TableBench (independent), behind Azure and Textract | Not published on RD-TableBench; 58.1 on multilingual tables (authors); Surya 2.5 table output lacks row/column geometry |
| Benchmarks and speed | Not published beyond the table score | 83.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
- Document AI pricing
- Document AI limits
- Reducto RD-TableBench
- Surya GitHub README
- Datalab pricing and license FAQ
What each one is
Google Document AI
Google Cloud OCR with layout parsing and specialised processors.
Google Document AI detailsSurya
Open-source OCR toolkit with line detection, layout analysis, reading order and tables.
Surya 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": ["datalab/surya"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Google Document AI alternativesSurya alternativesBest OCR models in 2026