Installation
Basic Setup
Configuration Options
Usage with Flows
Output: DocumentIR
Surya returns aDocumentIR with text and bounding boxes:
Supported Formats
| Format | MIME Type |
|---|---|
application/pdf | |
| PNG | image/png |
| JPEG | image/jpeg |
| GIF | image/gif |
| TIFF | image/tiff |
| WebP | image/webp |
| DOCX | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
| DOC | application/msword |
Input Methods
URL
Base64
Async Processing
Surya uses async processing for large documents. The SDK handles polling automatically:Self-Hosted Deployment
Run Surya locally for reduced latency and cost:Pricing
| Service | Cost |
|---|---|
| Surya OCR | $0.01 per page |
When to Use Surya
Use Surya when:- You need precise bounding boxes for citations
- Processing text-heavy documents
- Building RAG pipelines with positional data
- You need OCR before LLM extraction
- Documents have complex visual layouts
- Tables and forms are primary content
- Speed is more important than OCR accuracy
Example: OCR + Extraction Pipeline
Next Steps
Marker OCR
Markdown conversion
Reducto
Chunking and splitting