Everything you need to integrate ocr into your applications. SDKs, API reference, and response formats.
ocr uses a distributed pipeline architecture to process documents at scale. Each document flows through these five stages:
Send documents via REST API or SDK. We accept JPEG, PNG, TIFF, BMP, WebP, and PDF formats up to 100MB.
Our AI classifies the document type (invoice, receipt, contract, etc.) to optimize recognition settings.
Multi-page documents are intelligently segmented. PDFs are rasterized at 300 DPI for optimal accuracy.
Our OCR engine extracts text with 99.9% precision using advanced deep learning models.
Results are sent via WebSocket in real-time or REST callback. Data is encrypted in transit and at rest.
Install and use our TypeScript SDK for Node.js applications.
Install and use our Go SDK for high-performance backend applications.
Install and use our Java SDK for JVM-based applications. Java 11+ compatible.
Async Python SDK using websockets and aiohttp. Requires Python 3.9+.
REST and WebSocket endpoints for the OCR service.
/ws
WebSocket endpoint. Opens a connection and receives a token. Reconnect with ?token=<token> to resume a session and receive pending results.
token - Existing token for reconnection (optional){"type":"connected","token":"..."} - Sent on connection{"type":"result","file_id":"...","recognized_text":"..."} - OCR result{"type":"error","file_id":"...","error":"..."} - Processing error{"type":"unknown_type","file_id":"...","error":"..."} - Unsupported format/upload
Upload a document for OCR processing. Requires a valid WebSocket token.
multipart/form-data
Form Fields:
token - Your WebSocket session token (required)file - The document file (required). Supports JPEG, PNG, TIFF, BMP, WebP, PDF.{"file_id":"uuid","status":"uploaded"}/health
Health check endpoint. Returns server and database status.
/sdk/typescript
Download the TypeScript SDK as an npm-installable tarball.
/sdk/java
Download the Java SDK as a self-contained JAR with all dependencies.
/sdk/python
Download the Python SDK as a pip-installable wheel.
WebSocket messages delivered in real-time as JSON.
typeMessage type: connected, result, error, unknown_typefile_idUUID of the uploaded filerecognized_textExtracted text (present on type: result)errorError description (present on type: error)tokenSession token (present on type: connected)