Docs › API reference › Identity verification
Face match
Takes two base64-encoded images and compares their likeness. It works for headshot photos only, and returns a score out of 100 plus a pass or fail IsMatch based on a threshold.
ImageOne: the selfie.ImageTwo: theprimary_faceimage extracted from the ID with Download primary face image.
POST
https://api.screenlyyid.com/api/v1/facematchHeaders#
| Name | Type | Required | Description |
|---|---|---|---|
x-api-key | string | Yes | Your ScreenlyyID API key |
x-correlation-id | string (uuid) | Yes | Correlation ID for this customer check |
Request body#
| Field | Type | Required | Description |
|---|---|---|---|
Settings | object | No | |
Settings.SubscriptionId | string | No | |
Data | object | No | |
Data.ImageOne | string | No | |
Data.ImageTwo | string | No |
Responses#
| Status | Description |
|---|---|
200 | Successful response |
Code samples#
curl --request POST \
--url 'https://api.screenlyyid.com/api/v1/facematch' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-correlation-id: YOUR_CORRELATION_ID' \
--header 'Content-Type: application/json' \
--data '{
"Settings": {
"SubscriptionId": "<SubscriptionId>"
},
"Data": {
"ImageOne": "<base64-encoded image>",
"ImageTwo": "<base64-encoded image>"
}
}'const body = {
"Settings": {
"SubscriptionId": "<SubscriptionId>"
},
"Data": {
"ImageOne": "<base64-encoded image>",
"ImageTwo": "<base64-encoded image>"
}
};
const response = await fetch(
"https://api.screenlyyid.com/api/v1/facematch",
{
"method": "POST",
"headers": {
"x-api-key": "YOUR_API_KEY",
"x-correlation-id": "YOUR_CORRELATION_ID",
"Content-Type": "application/json"
},
"body": JSON.stringify(body)
}
);
const result = await response.json();import requests
payload = {
"Settings": {
"SubscriptionId": "<SubscriptionId>"
},
"Data": {
"ImageOne": "<base64-encoded image>",
"ImageTwo": "<base64-encoded image>"
}
}
response = requests.post(
'https://api.screenlyyid.com/api/v1/facematch',
headers={
"x-api-key": "YOUR_API_KEY",
"x-correlation-id": "YOUR_CORRELATION_ID"
},
json=payload
)
result = response.json()using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
client.DefaultRequestHeaders.Add("x-correlation-id", "YOUR_CORRELATION_ID");
var json = @"{
""Settings"": {
""SubscriptionId"": ""<SubscriptionId>""
},
""Data"": {
""ImageOne"": ""<base64-encoded image>"",
""ImageTwo"": ""<base64-encoded image>""
}
}";
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.screenlyyid.com/api/v1/facematch", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();