OCRFlow
The open-source canvas for document AI — drag open OCR models onto a canvas, wire them together, and turn any PDF into validated JSON on your own hardware.

- Ready-to-run nodes
- 30+
- OCR engines
- 7
- Files per API call
- 50
- Cost per page
- Free
Overview
A closed cloud API, or a pile of glue scripts
Document AI today usually means choosing between a metered cloud OCR service that sees every invoice, contract and medical record you send it, or a stack of one-off scripts wrapped around a single library.
OCRFlow puts the open models and the tooling around them in one place: a canvas to build and inspect pipelines, and an API to run them in production — all on your own machines.
Typed wires, no silent breakage
Every node does one thing and every port carries a type — PageArtifact, Region[], TextLine[], JSON. Nodes only connect when the output actually fits the next input, so broken pipelines are caught while you draw them, not in production.
- Best model per step
- layout with Docling, text with Surya, tables with Paddle, fields with Qwen
- Inspect every step
- layout boxes, recognized lines with confidence, final JSON
- Schema-validated output
- every LLM/VLM response checked before it moves on
- Ship headless
- promote a canvas to a pipeline and POST documents to it
Your documents stay home
All default models are open-weight and run locally. NVIDIA, AMD and Apple Silicon GPUs are detected automatically, engines that aren't running show up greyed out in the palette, and the whole stack can run fully air-gapped.
Product tour
How it works
A lightweight control plane orchestrates independent model services. The gateway forwards typed requests to whichever engine owns the model, and each engine loads its weights only when first used — you run only what you need.
- Canvas · REST API
build visually, call the same graph headless
- Control plane
FastAPI gateway, Celery worker, Postgres, Redis
- Model services
Surya, Docling, Paddle, Liquid, Unlimited-OCR, Ollama
Built with
- Next.js 16 + React Flowthe typed canvas
- FastAPI gatewaynever imports PyTorch
- Celery + Redisbatch jobs and runs
- PostgreSQLprojects, pipelines, traces
- Docling · Surya · PaddleOCRlayout, text, tables
- Ollama · LFM2.5-VL · hosted LLMsschema-validated extraction
Run it yourself
$ git clone https://github.com/baselhusam/OCRFlow.git && cd OCRFlow$ cp backend/docker/.env.example backend/docker/.env$ make up$ make db-migrate
$ make ocr-up # every engine, GPU auto-detected$ make ocr-surya # ...or one at a time$ make detect # which accelerator overlay is used
Details
- Status
- Active — v0.1.0
- Started
- Jul 2026
- Domain
- Document AI / Developer Tools
- License
- MIT
- Hosting
- 100% self-hosted
- Hardware
- NVIDIA · AMD · Apple Silicon · CPU
- Deploy
- Docker Compose · air-gapped
- Access
- REST API + keys