Endpoint
POST/loopos_ai_id_validator
Analyzes ID document images to extract document type, number, name, and expiry date, and validates document authenticity.
Request
Language code for the request
List of image URLs or base64 data URLs (typically front and back of document)
ID validation specific parameters:
doc_type(string, required): Document types to accept, comma-separated (e.g., “passport,id-card”)name(string, optional): Expected name on document (if nil, no name validation performed)number(string, optional): Expected document number (if nil, no number validation performed)validity(boolean, optional): Should verify if validity is in the future (if false, no validity validation performed)
Business context for the AI agent
Additional session metadata
Response
Overall result: “OK”, “ERROR_IMAGE_QUALITY”, or “ERROR_VALIDATION”
Human-readable message (localized)
Canonical document type detected (e.g., “dni-es”, “passport”, “cc-pt”)
Extracted document number (normalized)
Extracted holder name (uppercase, no diacritics if normalized)
Expiry date in ISO YYYY-MM-DD format if found
Document ID in docType_country_number format
Heuristic overall OCR confidence (0-1)
Explanation of the validation process
Example Request
Example Response
Status Values
- OK: Document is legible and valid
- ERROR_IMAGE_QUALITY: Image is illegible or poor quality
- ERROR_VALIDATION: Image is legible but validation failed (name/number/validity mismatch)
Related Documentation
- ID Validator Service - Service overview
- Integration Guide - Integration patterns