Skip to main content
POST
Compare two face images
Send two images as multipart/form-data: the live selfie in image1 and the reference photo, usually the face on an ID card, in image2. If the reference is already hosted, pass image2_url instead of uploading it. idto compares the two faces and returns a score and a decision. Every response has the same shape whichever source serves the call. Branch on error_code and data.is_match:
  • error_code: null, data.is_match: true: the faces match. Billed.
  • error_code: null, data.is_match: false: the comparison ran and the faces do not match. Billed, because the check ran to a definitive answer.
  • Any non-2xx response: the check did not complete. Never billed.

Environments

Input rules

How the decision is made

A score between 60 and 70 is MEDIUM but not a match. Route those cases to manual review rather than rejecting them outright.

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

On IDTO_503, resize or re-capture the image. IDTO_509 means no score could be produced; ask the user for a clearer, front-facing photo and retry. Retry 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

multipart/form-data
image1
file
required
image2
file

Exactly one of image2 / image2_url must be given.

image2_url
string
workflow_session_token
string

Response

The face comparison ran to completion. This product has no no-record outcome; every result is either a match score or a raised error.

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