Installation
Basic Setup
Configuration Options
Usage with Flows
Output: DocumentIR
Surya returns aDocumentIR with text and bounding boxes:
Supported Formats
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
Cost is included in the response:
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