Skip to main content
POST
Check liveness of a face image
Send one selfie as base64 in person. idto checks it for signs of a presentation attack, such as a photo of a screen or a printout, and for capture problems such as closed eyes, blur or low light. Run it before Face match so you only compare faces from a live capture. Every response has the same shape whichever source serves the call. Branch on error_code and data.is_live:
  • error_code: null, data.is_live: true: the capture looks live. Billed.
  • error_code: null, data.is_live: false: the check ran and the capture failed it. Billed.
  • Any non-2xx response: the check did not complete. Never billed.

Environments

Input rules

Response fields

When is_live is false, ask the user to retake the selfie in good light, facing the camera, with nothing covering the face.

Retries and duplicate protection

Send an Idempotency-Key header (at most 255 characters) to make retries safe. Replaying the same key with the same body within 48 hours returns the stored first response without a new check or a new charge. The same key with a different body returns IDTO_010 (422). A replay while the first call is still running returns IDTO_004 (409). If the first call returned an error, nothing is stored, so a retry runs the check again.

Errors

IDTO_503 is also returned, with the standard image message, when person is larger than 10 MB. Retry IDTO_609, IDTO_004, IDTO_006 and IDTO_008 with backoff. Full taxonomy: v2 error codes.

Test scenarios

Questions: Face and liveness FAQ.
Was this page helpful? Email us at tech@idto.ai with the page link.

Authorizations

X-Client-ID
string
header
default:<client-id>
required

The Client ID shown on the API Credentials page of the idto dashboard. It is not your account or customer ID, which returns 401. Send it on every server-to-server request together with X-API-Key. Staging and production client IDs are different.

X-API-Key
string
header
default:<api-key>
required

Your API key from the idto dashboard (API credentials). Keep it on your server; never ship it in a browser or mobile app. Send it on every server-to-server request together with X-Client-ID.

Headers

Idempotency-Key
string

Make retries of this exact request safe. If the same key is replayed with an identical request body, the original result is returned without re-running the verification or billing again. If the same key is replayed with a different body, the request is rejected with IDTO_010 (422). Omitting this header runs every request as new.

Maximum string length: 255

Body

application/json
person
string<byte>
required

Base64-encoded face image.

user_id
string
workflow_session_token
string

Response

The liveness check ran to completion. This product has no no-record outcome.

status
enum<string>
required
Available options:
success
message
string
required
error_code
string | null
required

null on a full match, an IDTO_2xx code on a definitive no-record result. Both are billed.

data
object | null
required
billed
enum<boolean>
required
Available options:
true
tranx_id
string | null
timestamp
string<date-time> | null
Last modified on December 1, 2026