OCR & Computer Vision
OCR & Computer Vision
OCR & Computer Vision
The OCR API (/v1/ocr/) is a standalone computer vision service for document extraction, face matching, liveness detection, and compliance checks. It operates independently from the Digital Identity flow — you can use it without user registration.
Extract text and data from Egyptian national ID front and back
Extract passport machine-readable zone (MRZ) and biographical data
Extract vehicle license front (owner info) and back (vehicle specs)
Extract Egyptian driving license data
Match a face to an ID photo or compare two face images
Extract text from Egyptian vehicle license plates
The OCR API uses a different base path from the Digital Identity API:
Every request requires:
All OCR endpoints accept a JSON body with image as a base64-encoded string, plus optional transaction and control fields:
data contains document-specific extracted fields. All step outputs include transaction_id, request_id, and client_transaction_id.
Response data fields:
Response data fields: maritalStatus, job, jobTitle, religion, husbandName, releaseDate, idExpiry, idNumber, gender
Response data fields:
Response data fields: license_number, license_type, name, nationality, address, expiry, issuance, traffic_unit
Response data fields: model_year, type, sub_type, chasis, volume, motor, color, fuel, cylinder, examination_dt
Response data fields: NameArabic, NameEnglish, NationalID, NationalityArabic, NationalityEnglish, LicenseType, Job, Address, ExpiryDate, IssuenceDate, TrafficUnit1, TrafficUnit2
Match a face image against the ID front photo stored in a transaction. Requires completing the id/front step first for the same transaction_id.
Response data fields:
Compare any two face images directly, without requiring an ID transaction.
Response data fields: same as Face Match — isMatched, dissimilarity, threshold, score
Verify that a face image is from a live person, using three frames captured in quick succession.
All three images must be of the same person and captured within 0.5 seconds of each other. Compress each to under 500 KB.
Response data fields: result — the extracted plate text
Identify the type of document in an image before processing it with a specific endpoint.
Response services.classification.doc_type returns the detected type (e.g., national_id, passport, driving_license).
Every endpoint has an equivalent /file variant that accepts a multipart/form-data upload instead of base64:
Check a name or ID number against criminal and AML records.
Use the OCR API when you need raw document extraction or biometric checks without tying the result to a Vlens user. Use the Digital Identity verify flow when you need the result to count toward a user’s verification status.