Repository navigation
REST API endpoints #1754
Replies: 1 comment
|
This is a very relevant proposal, especially as RAG and multimodal AI pipelines increasingly demand self-hosted, deterministic OCR pipelines over proprietary document APIs. Having built and scaled OCR microservices in production, the primary friction point maintainers face when wrapping CLI engines like OCRmyPDF in HTTP interfaces is the fundamental impedance mismatch between HTTP request/response lifecycles and PDF OCR execution semantics (as previously touched on in #1581). Here is a pragmatic architecture for how a supported REST API / Docker deployment can be structured without overburdening the core library: 1. Asynchronous Job Processing Over Synchronous RESTDirect synchronous execution (
Recommended API Contract (Async Queue):
2. Microservice Topology (Separation of Concerns)To keep the core 3. Critical Operational Considerations for Self-HostingIf implementing an official Docker Compose stack:
A reference |
Uh oh!
There was an error while loading. Please reload this page.
I’ve been experimenting with OCRmyPDF and think it fills an important niche. Many OCR options are either paid APIs, difficult to deploy, or part of much larger document-processing platforms with significant operational overhead. Sometimes developers simply need a fast, reliable OCR tool for ordinary scanned PDFs.
I’d like to reopen the discussion around exposing OCRmyPDF’s capabilities through a supported REST API.
OCR remains a barrier in many AI-driven document-processing workflows. Local OCR is already very capable for clean scans, so quality is often not the main limitation. In my view, the larger barrier is ease of integration: paid APIs are frequently chosen because they offer a straightforward HTTP interface, even when local OCR would be sufficient.
I have read the concerns in #1581 and wanted to add this perspective. A supported Docker Compose deployment and REST API would make OCRmyPDF much easier to adopt in automation and AI workflows, especially those built around CLI tools and HTTP services.
It could remain fully self-hosted, while an optional hosted/paid offering could potentially provide a sustainable revenue stream for the project.
All reactions