Skip to main content
POST
Face liveness check

Authorizations

Authorization
string
header
required

Your secret key (sk_live_…), server-side only. Also accepted as an x-api-key header.

Body

The image, in any supported form. Max 10 MB. EXIF orientation is applied automatically. The detected face's bounding box must be at least 224×224 pixels, or the call returns 422 FACE_TOO_SMALL — pass min_face_check: false to skip that gate.

data
string

Base64-encoded image, or a full data URL. Alias: image.

image_url
string<uri>

http(s) URL we fetch server-side (10 s timeout). Alias: url. Provide either data or image_url.

threshold
number

Optional per-request decision threshold. Defaults to your org setting (0.5 unless changed).

Required range: 0 <= x <= 1
thresholds
object

Unified only: per-product thresholds, e.g. {"face_liveness": 0.6, "deepfake": 0.4}.

min_face_check
boolean
default:true

Set to false to disable the 224×224 minimum-face-size gate (422 FACE_TOO_SMALL) for this request. Small faces are upscaled before scoring, so accuracy degrades on faces well under 224 px — use only if your capture flow can't guarantee close-up faces. A face must still be detectable.

Response

Scored check

product
enum<string>
Available options:
face_liveness,
deepfake
decision
enum<string>

genuine_score > threshold

Available options:
real,
spoof
genuine_score
number

Calibrated score in [0,1].

threshold
number

The threshold actually applied (request override, org setting, or 0.5).

spoof_type
string | null

Always null for current models.

latency_ms
integer

Model inference time.

credits_remaining
integer

Balance after this call.

session_id
string

Id of the logged detection session (visible in the console).

request_id
string

Quote this when contacting support.