Passport OCR API
Extract the machine-readable zone and the printed fields from passport photos and scans for KYC and onboarding flows.
Resultat
Dit Markdown eller JSON vises her.
What makes passports hard to read
- Glare from the laminate and holograms
- MRZ check digits must validate
- Names with diacritics or non-Latin scripts
What you can pull out
passport fields
{
"document_number": "PA1234567",
"surname": "CITIZEN",
"given_names": "JANE",
"nationality": "AUS",
"date_of_birth": "1990-04-12",
"sex": "F",
"expiry_date": "2031-06-30",
"mrz": "P<AUSCITIZEN<<JANE<<<<<<<<<<<<<<<<<<<<<<<<<<<"
}Best models for passports
1Azure Document IntelligenceAzure layout model with tables, selection marks and prebuilt invoice and ID readers.
azure/document-intelligence15 credits / page2Google Document AIGoogle Cloud OCR with layout parsing and specialised processors.google/document-ai3 credits / page3Gemini FlashGeneral vision model with strong handwriting and layout understanding at a low price.google/gemini-flash3 credits / pageCall it from your code
curl https://api.ocrrouter.ai/v1/ocr \
-H "Authorization: Bearer $OCRROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "azure/document-intelligence",
"file_url": "https://example.com/invoice.pdf",
"format": "json"
}'