ID Analyzer Biometric API
Face matching and liveness detection
Face matching and liveness detection
openapi: 3.0.3
info:
title: ID Analyzer Scanner Account Biometric API
description: REST API for scanning and performing OCR on government-issued identity documents including passports, driver licenses, and national ID cards from 190+ countries. Extracts structured data fields, performs anti-forgery analysis with 20+ fraud detection models, and validates MRZ codes, holograms, and watermarks. Supports full KYC scan with biometric face verification, quick OCR scan, and very-quick OCR scan variants.
version: '2.0'
contact:
name: ID Analyzer Support
url: https://www.idanalyzer.com/contact-us
email: support@idanalyzer.com
termsOfService: https://www.idanalyzer.com/en/terms-of-service
license:
name: Proprietary
url: https://www.idanalyzer.com
servers:
- url: https://api2.idanalyzer.com
description: US Region
- url: https://api2-eu.idanalyzer.com
description: EU Region
security:
- ApiKeyHeader: []
tags:
- name: Biometric
description: Face matching and liveness detection
paths:
/face:
post:
tags:
- Biometric
operationId: verifyFace
summary: 1:1 face verification
description: Perform 1:1 face verification using a selfie photo or video against a reference face image (e.g. the photo on an ID document). Includes passive liveness detection to prevent spoofing attacks.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FaceVerifyRequest'
responses:
'200':
description: Face verification result with match score and liveness status
content:
application/json:
schema:
$ref: '#/components/schemas/BiometricResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
/liveness:
post:
tags:
- Biometric
operationId: verifyLiveness
summary: Standalone liveness check
description: Perform a standalone liveness check on a selfie photo or video without comparing to a reference image. Detects presentation attacks including photos, videos, masks, and deepfakes.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LivenessRequest'
responses:
'200':
description: Liveness check result
content:
application/json:
schema:
$ref: '#/components/schemas/BiometricResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
components:
responses:
Unauthorized:
description: Unauthorized - invalid or missing API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
BadRequest:
description: Bad request - invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
schemas:
FaceVerifyRequest:
type: object
required:
- reference
- profile
properties:
reference:
type: string
description: Reference face image (ID document photo, file path, base64, URL, or cache ref)
face:
type: string
description: Selfie face photo (file path, base64, URL, or cache reference)
faceVideo:
type: string
description: Selfie face video (file path, base64, or URL). Used if face is empty.
profile:
type: string
description: KYC Profile ID or preset profile name
profileOverride:
type: object
description: Per-request overrides applied on top of the specified profile
additionalProperties: true
customData:
type: string
description: Arbitrary string to store alongside the transaction
ErrorObject:
type: object
properties:
code:
type: integer
description: Error code
message:
type: string
description: Human-readable error message
ErrorResponse:
type: object
properties:
error:
$ref: '#/components/schemas/ErrorObject'
LivenessRequest:
type: object
required:
- profile
properties:
face:
type: string
description: Selfie face photo (file path, base64, URL, or cache reference)
faceVideo:
type: string
description: Selfie face video (file path, base64, or URL). Used if face is empty.
profile:
type: string
description: KYC Profile ID or preset profile name
profileOverride:
type: object
description: Per-request overrides applied on top of the specified profile
additionalProperties: true
customData:
type: string
description: Arbitrary string to store alongside the transaction
BiometricResponse:
type: object
properties:
decision:
type: string
enum:
- accept
- review
- reject
description: Biometric verification decision
transactionId:
type: string
description: Unique transaction identifier
confidence:
type: number
description: Face match confidence score (0-1)
liveness:
type: object
description: Liveness check result
properties:
decision:
type: string
confidence:
type: number
error:
$ref: '#/components/schemas/ErrorObject'
securitySchemes:
ApiKeyHeader:
type: apiKey
in: header
name: X-Api-Key
description: API key obtained from portal2.idanalyzer.com