# Surya

> OCR, layout analysis, reading order and table recognition in 90+ languages

Source: https://talira.ai/catalog/surya-r0seayx2
Every listing: https://talira.ai/catalog.md

- Kind: Source available
- Types: Library, Command-line tool, AI model
- Categories: [ai / ocr](https://talira.ai/categories/ai/ocr), [ai / document parsing](https://talira.ai/categories/ai/document-parsing), [languages / python](https://talira.ai/categories/languages/python)
- Platforms: linux, macos[^1]
- Licence: Apache-2.0 AND Datalab OpenRAIL-M (modified) (source-available)[^3][^4][^5]
- Pricing: Free[^1][^3]
- Pricing notes: Code free under Apache-2.0; model weights free for research, personal use and organizations under $5M gross revenue and $5M funding, never for a product that competes with Datalab; others need a commercial licence from Datalab. Datalab's hosted API, which uses Surya and Chandra, gives about 5,000 free convert pages a month with a work email.
- Free tier: yes[^1][^3]
- Self-hostable: yes[^1]
- Cloud hosted: yes[^1]
- Made by: [Datalab](https://talira.ai/orgs/datalab.md)
- Funding: venture-backed[^6]

Surya is Datalab's document OCR toolkit and model: a single 689M-parameter vision-language model (Surya 2.5) that does OCR, layout analysis with reading order, table recognition and inline math for PDFs and page images in about 90 languages. Each page comes back as blocks with a label (text, section header, table, equation, picture, form and more), a polygon and bounding box, a confidence score and the content as HTML, with tables as `<table>` markup with merged cells and equations as KaTeX-compatible LaTeX. The `surya-ocr` Python package and its CLIs (`surya_ocr`, `surya_layout`, `surya_table`, `surya_gui`) are a light client that starts and talks to a [vLLM](https://talira.ai/catalog/vllm-f1czevpj.md) server on NVIDIA GPUs, [llama.cpp](https://talira.ai/catalog/llama-cpp-g0rydd64.md) on CPU or Apple Silicon, or MLX. The code is Apache-2.0 but the weights use Datalab's modified OpenRAIL-M licence, free for research, personal use and companies under $5M in revenue and funding; [Marker](https://talira.ai/catalog/marker-0jjg1zab.md) uses Surya for scanned pages, and Datalab's hosted API runs it with its larger Chandra model.

## Links

- GitHub: https://github.com/datalab-to/surya
- Pricing: https://www.datalab.to/pricing

## Problems it solves

- OCR scanned PDFs in dozens of languages and keep each block's position on the page
- work out the reading order of a multi-column newspaper or magazine scan
- detect tables, headers, figures and equations on document pages before extracting text
- turn a table in a scanned report into HTML with merged cells intact
- read equations in scanned math papers as LaTeX along with the surrounding text
- run document OCR locally on my Mac with llama.cpp instead of sending pages to a cloud API
- an open document OCR model under 1B parameters that's accurate enough to replace Tesseract
- OCR old handwritten letters and government forms into structured JSON
- let my AI agent OCR a PDF from the shell and read the JSON from stdout
- batch-OCR thousands of pages on one GPU server with vLLM

## Features

- one 689M-parameter VLM for OCR, layout and tables (Surya 2.5)
- about 90 languages; 91-language benchmark published by Datalab
- layout labels such as Table, Picture, SectionHeader, Equation and Form, with reading order
- tables as HTML with colspan and rowspan for merged cells
- inline math as KaTeX-compatible LaTeX
- block polygons, bounding boxes and confidence scores in JSON
- full-page or block-by-block OCR modes
- images, PDFs and folders as input, with page ranges
- vLLM (NVIDIA GPU, Docker or Podman), llama.cpp (CPU and Apple Silicon) and MLX backends
- attach to any OpenAI-compatible server with SURYA_INFERENCE_URL
- surya_gui browser viewer for layout, reading order, math and tables
- bundled agent skill (--skill, --install_skill) and --stdout JSON for agents
- GGUF and MLX conversion scripts

## Limitations

- Not for photos or natural scene text: Datalab says Surya is specialized for document OCR and layout analysis[^1][^2]
- Model weights aren't free for commercial use by larger companies: over $5M in revenue or funding needs a licence from Datalab, and competing products are barred[^1][^3]
- No row and column geometry for tables in Surya 2.5: it returns tables as HTML, and cell geometry needs the older Surya 2 checkpoint[^2]

## Capabilities

- Has a command line tool: plan not known
- Has official SDKs: plan not known

## Trust

Overall: 0.42 out of 1.
Signals: backing 0.55, extensibility 0.20.

- made by Datalab
- funding: venture-backed

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [Mistral OCR](https://talira.ai/catalog/mistral-ocr-nzhs5x26.md): Mistral AI's document OCR model and API: PDFs and images to structured Markdown, priced per page
- [PaddleOCR](https://talira.ai/catalog/paddleocr-9cdc22eq.md): Turn any PDF or image document into structured data for your AI
- [docTR](https://talira.ai/catalog/doctr-5n27z5h2.md): Document Text Recognition: open source OCR powered by PyTorch
- [PP-OCRv6](https://talira.ai/catalog/pp-ocrv6-jzbxc0ky.md): PaddleOCR's sixth-generation text detection and recognition models, from 1.5M to 34.5M parameters
- [Tesseract](https://talira.ai/catalog/tesseract-n5wxbj3p.md): Tesseract Open Source OCR Engine
- [EasyOCR](https://talira.ai/catalog/easyocr-hd0rqfgh.md): Ready-to-use OCR with 80+ supported languages and all popular writing scripts

## Sources

[^1]: https://github.com/datalab-to/surya/blob/master/README.md (checked 20 Nov 2026)
[^2]: https://huggingface.co/datalab-to/surya-ocr-2.5 (checked 20 Nov 2026)
[^3]: https://github.com/datalab-to/surya/blob/master/MODEL_LICENSE (checked 20 Nov 2026)
[^4]: https://github.com/datalab-to/surya/blob/master/LICENSE (checked 20 Nov 2026)
[^5]: https://pypi.org/project/surya-ocr/ (checked 20 Nov 2026)
[^6]: https://pebblebed.com/portfolio/datalab (checked 20 Nov 2026)
