Face liveness API
Tell a real person from a photo, screen or mask.
Overview
Passive liveness on a single selfie. No blinking or head-turning needed, so drop-off stays low. Pair it with face match for a full selfie check.
POST/v1/face/liveness
Where it’s used
- Remote onboarding
- Attendance and field-force apps
- High-risk transaction step-up
How the check runs
- You send one selfie.
- We analyse texture, depth cues, moiré patterns and edges to spot prints, screens and masks.
- You get live / spoof with a confidence score.
Request
| Field | Description |
|---|---|
selfie | Image, base64 or URL |
curl -X POST https://api.yetlix.com/v1/face/liveness \
-H "x-client-id: $YETLIX_CLIENT_ID" \
-H "x-client-secret: $YETLIX_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"selfie":"data:image/jpeg;base64,/9j/4AAQ…"}'
{
"status": "success",
"request_id": "req_7Hq2kD91",
"data": {
"live": true,
"confidence": 0.97,
"spoof_type": null
}
}
Response fields
Inside the data object. The envelope (status, request_id, billable, timestamp) is the same for every API and is described in the docs.
| Field | Type | Meaning |
|---|---|---|
live | boolean | true for a real, present person. |
confidence | number | 0–1 confidence in the result. |
spoof_type | enum | PRINT, SCREEN, MASK or null. |
Outcomes and what to do
Every check can end in a handful of ways. Decide up front what your product does in each case, so nothing falls through to a support ticket.
live, confidence ≥ 0.9
Real person.
Do this: Continue to face match.
spoof
Photo, screen or mask.
Do this: Reject. Allow one retry, then flag the account.
Sandbox test values
Send these values in selfie with your sandbox key to get each result. Anything else returns INVALID_INPUT in sandbox.
| Value | Returns |
|---|---|
live.jpg | Live person |
screen.jpg | Screen replay |
Best practices
- Capture the selfie in your own camera screen, not from the gallery.
Compliance note. Liveness supports the requirement that remote KYC confirms the customer is physically present.
Frequently asked
Is it active or passive?
Passive. One normal selfie, no head turns.