Skip to main content
LumiID’s Liveness Detection API verifies that a submitted selfie belongs to a real, live person — not a photograph, screen replay, mask, or AI-generated deepfake. The check is passive: your users don’t need to blink, turn their head, or take any deliberate action. Submit a single Base64-encoded image and receive a liveness verdict and rich face-analysis metadata in under 500 ms. Use this API as the first step in any identity verification pipeline to block presentation attacks and synthetic identity fraud before they reach downstream checks.

Overview


Endpoint

Headers

Request body

string
required
Base64-encoded selfie image. Accepts both raw Base64 and Data URL formats (e.g. data:image/jpeg;base64,...).

Example request

Success response

Response fields

object
Contains the liveness result and detected-face data.

Image requirements

  • Maximum size: 10 MB
  • Minimum resolution: 224 × 224 px
  • Accepted formats: JPEG, PNG, WebP, BMP
  • Encoding: Raw Base64 or Base64 Data URL
  • Faces per image: One — reject images with multiple faces before submitting

Error codes


Run Liveness Detection first in your pipeline before any downstream identity check.
1

Capture a selfie

Capture a front-facing selfie from your user using a live camera feed.
2

Run Liveness Detection

Submit the selfie to this endpoint and confirm that liveness_check is true before proceeding. Reject or re-prompt if the result is false.
3

Verify government identity

Validate the customer’s NIN, BVN, or other government-issued identity number against the official registry.
4

Run Face Comparison

Compare the live selfie against the government-issued biometric photo using the Face Match API or the Government ID Face Match API.
5

Proceed with onboarding

Complete onboarding after all checks pass. This workflow prevents spoofing, deepfakes, synthetic identities, and impersonation fraud.

Best practices

  • Capture selfies in good, even lighting — avoid harsh shadows or backlit environments.
  • Ensure only one face is visible in the frame before submitting.
  • Ask users to face the camera directly without tilting or turning their head.
  • Reject images where the user is wearing sunglasses, a mask, or heavy filters.
  • Keep the face between 10% and 40% of the total image area.
  • Submit original camera photos rather than screenshots, image forwards, or compressed files.

Code example

Python