Check a selfie
Content type multipart/form-data
Tells you whether a selfie shows a live person rather than a printed photo or a screen. The call is synchronous: you get back the finished run, already charged.
Request
curl -X POST "https://studioapi.kriyam.ai/models/facex/liveness-selfie/v1" \ -H "X-API-Key: $KRIYAM_API_KEY" \ -F "image=@selfie.jpg" \ -F "cached=False"
Response
Authentication
Send your key in the X-API-Key header. See Authentication.
Request
Body
| Name | Type | Required | Description |
|---|---|---|---|
image | file | Required | The selfie to check. PNG or JPEG, up to 2 MB. |
cached | boolean | Optional | Return the result of an identical file checked by you or your team in the last 30 days by the same version, free, instead of running again. The response then has Default |
Response
200 OK
Returns the run envelope. The fields below are what this tool puts inside it.
| Field | Type | Description |
|---|---|---|
cached | boolean | True when this is the free copy of an identical file checked by you or your team in the last 30 days (you sent |
result.liveness_analysis.is_live | boolean | null | The verdict: a live person in front of the camera. Null when the service didn't reach one — treat that as unknown, never as a pass. |
result.liveness_analysis.verdict | string | null | The same outcome as a label, for display. |
result.liveness_analysis.person_detected | boolean | null | A person was found at all. False makes every other signal meaningless. |
result.liveness_analysis.multiple_person_detected | boolean | null | More than one person is in frame — worth refusing in your own flow even when the verdict passes. |
result.liveness_analysis.screen_detected | boolean | null | The image looks like a photo of a screen — a replay attack. |
result.liveness_analysis.printed_photo_detected | boolean | null | The image looks like a photo of a printed photo. |
result.liveness_analysis.document_detected | boolean | null | A document was held up to the camera rather than a face presented. |
result.liveness_analysis.remarks | string | null | A human-readable summary of why. Free text — don't parse it. |
result.liveness_analysis.aigc_detection | object | null | Whether the image looks generated, when the service reports it. Genuinely null on most responses; use the AI Image Detection tool if you need this reliably. |
Errors
| Status | Code | When |
|---|---|---|
| 400 | — | The image is empty, over 2 MB, or can't be decoded. |
Every keyed call can also get401402403404429— see Errors.
