ID Document Recognition
Faceplugin ID Document Recognition HTTP API. POST /api/documentRecognition, /api/documentLiveness, /api/documentProcess, and /api/generalProcess on port 8082.
This is the HTTP API for ID Document Recognition. It runs on Linux Docker image faceplugin/document-reader and on the Windows app. Default port 8082.
documentRecognition
OCR, MRZ, barcode, image quality only
documentLiveness
Authenticity only
documentProcess
Combined pipeline (fields plus optional authenticity)
MRZ is the machine-readable zone on a passport. OCR means reading printed text from the image.
Shared routes (including GET /api/licenseStatus): Shared endpoints.
Install and run: ID Document Recognition Linux SDK · ID Document Recognition Windows SDK.
Result fields: Document result JSON. Security keys: Document security check fields.
Try it
curl -s -X POST http://127.0.0.1:8082/api/documentRecognition \
-H 'Content-Type: application/json' \
-d "{\"images\":[{\"image\":\"$(base64 -w0 id.jpg)\"}]}"POST /api/documentRecognition
OCR / MRZ / barcode / image quality only. Authenticity is always off. Caller response flags are ignored.
{
"images": [
{ "image": "<BASE64>", "page_idx": 0 },
{ "image": "<BASE64>", "page_idx": 1 }
]
}Repeated file field images (or a single image / file). Optional file rfid. Text isCropped.
Input
One or more page images (base64). Same images shape as documentProcess.
Return value
Engine JSON with OCR / MRZ / barcode / imageQuality. No security authenticity block.
Python:
POST /api/documentLiveness
Authenticity / security only. OCR / MRZ / barcode / image quality are always off. Caller response flags are ignored.
Use the same image body as documentRecognition. The dedicated Document Liveness product on port 8086 uses this same path. On Document Reader (8082) it is authenticity-only against the recognition engine.
Input
One or more page images (base64).
Return value
Engine JSON with security checks when the license includes Liveness. No images crops.
Python: sdk.document_liveness(images).
Also see ID Document Liveness HTTP API.
POST /api/documentProcess
Run a full document process (fields plus optional security).
Repeated file field images (or a single image / file). Optional file rfid. Text options or response as a JSON string. Text isCropped.
imagesmay also be a list of raw base64 strings. A single"image"field becomes a one-page list.You may nest flags as
"options": { "response": {...}, "isCropped": ... }. If you omitoptions, top-levelresponse/isCroppedare used."Authenticity": "none"skips liveness checks."normal"runs them when the license includes Liveness. Windows also documents"strict"."ImageQuality": "none"skips capture-quality checks and omitsimageQualityfrom the result."normal"(default) runs them.Optional
rfidis a string passed through to the engine. The Gradio demo does not walk through NFC/RFID capture.
Input
One or more page images (base64) and response flags.
Return value
Engine JSON (not the envelope).
Python:
Session helpers on sdk.py (start_new_session(), start_new_page(), unload(), get_license_status()) are not separate HTTP routes.
POST /api/generalProcess
Single-image general process.
Input
One base64 image.
Return value
Engine JSON from sdk.general_process.
Related documentation
Last updated