Linux
Faceplugin document verification API for Linux Docker. On-premise passport OCR, MRZ, and authenticity. POST /api/documentProcess on port 8082.
Fully on-premise ID Document Recognition HTTP API for Linux / Docker. Image: faceplugin/document-reader. Default port 8082. Gradio 9002.
Reads ID cards, passports, and driver licenses. OCR, MRZ, barcode / QR, image quality, crops, and optional authenticity (document liveness).
All processing stays on your server. No biometric data is sent to Faceplugin cloud.
Code
Setup
Sizing: Hosting requirements.
Run multiple containers with one license
You only need this section if you want to run multiple Document Reader containers on the same Linux host.
On Linux, mount /etc/machine-id into each container so they use the same machine code. Each container must have a different container name and host port.
For example:
Activate each container with the same license key (POST /api/activate on each host port).
On Docker Desktop (macOS/Windows), omit the /etc/machine-id volume. Each container may require its own license.
Other ways to run
Option B — Docker Compose (local build)
Put the Google Drive runtime files directly in lib/cpu/, then:
Option C — Native Linux (no Docker)
Same lib/cpu/ layout:
Try online: Hugging Face Space (Gradio UI → your Linux API).
License
Try it
Postman: import postman/DocumentReader-API.postman_collection.json from the repo. Base URL http://127.0.0.1:8082.
Gradio (host only):
Open http://127.0.0.1:9002. Tabs: Result, Liveness, Images, Raw JSON.
Parse the engine JSON with Document result JSON.
Integrate into your own app
HTTP
Any language. Keep this API running and POST page images.
sdk.py
Python on the same Linux host as lib/cpu/.
You do not need Gradio in production.
APIs
GET /api/health
Process is listening (no license)
GET /api/machinecode
Machine code
GET /api/licenseStatus
License status
GET /api/backend
"cpu"
POST /api/activate
Activate and init_sdk()
POST /api/documentRecognition
OCR / MRZ / barcode / image quality only
POST /api/documentLiveness
Authenticity only
POST /api/documentProcess
Combined OCR + optional authenticity
POST /api/generalProcess
Single-image general process
Full reference: Document Reader HTTP API. Shared control routes: Shared endpoints.
Some routes wrap the result in a small JSON object (an envelope). Process POSTs return engine JSON as the body. Authenticity-only without OCR: ID Document Liveness Linux SDK.
Python:
Request a License & Support · Contact us
FAQ
Document verification API? POST /api/documentRecognition / documentProcess on port 8082.
Passport OCR? Yes — OCR, MRZ, barcode, crops in the same JSON.
Related documentation
Last updated