{"service":"IDShield OCR API","version":"3.0.0","status":"production","description":"Multi-platform passport OCR with hybrid intelligence and 200+ OCR passes per image","features":["✓ Multi-architecture support (amd64/arm64)","✓ 6 OCR engines with 200+ passes per document","✓ Regional scanning (top 40%, middle 30%, full image)","✓ Intelligent name extraction with concatenation splitting","✓ 30+ country code mappings with nationality conversion","✓ MRZ dual-mode parsing (handles << and < separators)","✓ Smart place of birth cleaning with label removal","✓ Embedded separator detection (ANNAKMARIA → ANNA + MARIA)","✓ Image preprocessing & upscaling (640x453 → 1412x1000)","✓ Batch processing (up to 10 passports)","✓ Comprehensive logging with cleanup utilities"],"ocr_engines":["1. PassportEye - MRZ-specific TD1/TD2/TD3 reader (primary)","2. Tesseract OCR - 4 PSM modes (6, 3, 11, 4) for document text","3. EasyOCR - Neural network-based recognition","4. PaddleOCR - Additional accuracy layer","5. Keras-OCR - Fallback engine","6. DocTR - Advanced document text recognition","7. AWS Textract - Paid fallback (optional)"],"endpoints":{"GET /":{"description":"API documentation and service information","auth_required":false},"GET /health":{"description":"Health check with version info","auth_required":false,"response":{"status":"healthy","version":"3.0.0","timestamp":"ISO8601"}},"POST /ocr/passport":{"description":"Process single passport image","auth_required":true,"headers":{"X-API-Key":"your-api-key"},"body":{"file":"multipart/form-data (JPG, PNG, PDF)"},"max_file_size":"10MB","response_fields":["DOCUMENT_NUMBER, ID_TYPE, PASSPORT_TYPE","LAST_NAME, FIRST_NAME, MIDDLE_NAME","DATE_OF_BIRTH, PLACE_OF_BIRTH","SEX, NATIONALITY, NATIONALITY_FULL","ISSUE_COUNTRY, ISSUE_COUNTRY_CODE","EXPIRATION_DATE, DATE_OF_ISSUE (when available)","method (extraction method used)","confidence (accuracy score)"]},"POST /ocr/passport/batch":{"description":"Process multiple passports in one request","auth_required":true,"headers":{"X-API-Key":"your-api-key"},"body":{"files":"array of multipart/form-data"},"max_files":10,"max_file_size":"10MB per file","response":"Array of OCR results"},"GET /stats":{"description":"Usage statistics and success rates","auth_required":true,"status":"Coming soon"},"DELETE /logs/cleanup":{"description":"Clean up old logs and temporary files","auth_required":true,"headers":{"X-API-Key":"your-api-key"},"query_params":{"max_age_days":"30 (default)"},"cleanup_targets":["Log files older than max_age_days","All uploaded files in /app/uploads","All processed files in /app/processed","Debug images in /app/debug_images"],"response":{"cleaned":{"logs":{},"uploads":{},"processed":{},"debug_images":{}},"total_files_removed":0,"total_size_freed_mb":0.0}}},"authentication":{"method":"API Key","header":"X-API-Key","note":"All endpoints except / and /health require valid API key"},"supported_formats":{"mrz_types":["TD1 (ID cards)","TD2 (Travel documents)","TD3 (Passports)"],"image_formats":["JPEG (.jpg, .jpeg)","PNG (.png)","PDF (.pdf - first page only)"]},"docker_hub":"ironsouljah/idshield-ocr-php:3.0.0","architectures":["linux/amd64","linux/arm64"],"documentation":"https://github.com/ironsouljah/docker-ocr-api"}