Compare two photos of a face
Compares two photos and answers, in the same call, whether they show the same person. The verdict is judged against the pass mark and review floor recorded for your organisation. There is no per-request threshold, so apply a stricter bar by branching on confidence.
Sandbox. Sandbox keys always return a simulated verdict (a match unless sandboxOutcome asks for another), placed inside your own thresholds. Sandbox checks are free.
Billing. Production checks are charged per comparison. A no_match is charged, because the check ran and answered. When the comparison produces no answer the charge is refunded and the response is 502 no_result, which also carries the recorded faceCheck beside the error fields. When face matching is at capacity, a short burst waits its turn; beyond that the response is 503 face_engine_busy with a Retry-After header, before anything is recorded or charged.
Error codes
A missing or unknown key answers 401, where error is a short sentence rather than a code.
Requires a secret (sk_) key. A publishable key receives 403 secret_key_required.
Authentication
Send the API key as a Bearer token. Each operation states whether a publishable key is enough or a secret key is required. A scoped publishable key has Verification flow access, the fixed set flow.run, flow.config.read and verifications.status.read; a scoped secret key reaches what its scopes allow.
Request
The first photo, inline. An inline image is an https:// URL that is fetched for you, a data: URI, or base64-encoded bytes. JPEG, PNG and WebP are accepted, up to 25 MB by URL. Base64 travels inside the JSON body, which is capped at 10 MB.
The second photo, inline, in the same forms as imageA.
The first photo as a mediaId from the face upload endpoint, instead of imageA.
The second photo as a mediaId from the face upload endpoint, instead of imageB.
Picks the simulated verdict outside production. Sandbox keys are always simulated and default to match. Development keys run the real comparison unless an outcome is given, and live asks for the real comparison there. Ignored on live keys.