Face Detection
Face Detection is POST /v2/face-recognition/face-validation, an alias of the detect engine. image is required. If you omit them, this route sets min_score to 0.5 and search_mode to FAST. The live payload is face_count, faces (each with score and bbox), imageDimensions, and engine.
What the call returns
face_countfaces[].scoreandfaces[].bboximageDimensionsandengine
Use cases
- Count faces before liveness.
- Read the box of the primary face.
- Rely on the default score and mode when you only have an image.
API Reference
Endpoint
POST https://api.verifik.co/v2/face-recognition/face-validation
Read face_count first. Each item in faces has score and bbox. imageDimensions is the decoded width and height. engine names the detector.
Headers
| Name | Value | Description |
|---|---|---|
| Content-Type | application/json | Request payload format |
| Accept | application/json | Response format |
| Authorization | Bearer <your_token> | Client JWT |
Parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
image | string | Yes | data:image/jpeg;base64,AAAA | Face image as base64 or a data URI. Required. |
min_score | number | No | 0.5 | Optional. This route defaults it to 0.5. |
search_mode | string | No | FAST | Optional. This route defaults it to FAST. ACCURATE is the other value. |
Request
- Node.js / JavaScript
- Python
- cURL
import axios from "axios";
const options = {
method: "POST",
url: "https://api.verifik.co/v2/face-recognition/face-validation",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: "Bearer <your_token>",
},
data: {
"image": "data:image/jpeg;base64,AAAA"
},
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error.response ? error.response.data : error.message);
}
import requests
url = "https://api.verifik.co/v2/face-recognition/face-validation"
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer <your_token>",
}
payload = {
"image": "data:image/jpeg;base64,AAAA",
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
curl -X POST "https://api.verifik.co/v2/face-recognition/face-validation" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <your_token>" \
-d '{"image":"data:image/jpeg;base64,AAAA"}'
Response
- 200 (Record found)
- 409 (Missing parameter)
- 404 (Not found)
- 401 (Unauthorized)
- 500 (Source unavailable)
{
"data": {
"face_count": 1,
"faces": [
{
"score": 0.97,
"bbox": [
80,
60,
280,
320
]
}
],
"imageDimensions": {
"width": 640,
"height": 480
},
"engine": "insightface"
},
"signature": {
"dateTime": "November 27, 2026 12:00 PM",
"message": "Certified by Verifik.co"
}
}
{
"code": "MissingParameter",
"message": "\"image\" is required"
}
{
"code": "NotFound",
"message": "Record not found."
}
{
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
{
"code": "InternalServerError",
"message": "The official source is temporarily unavailable. Please retry shortly."
}
Notes
imageis the only required field.- Omitted
min_scorebecomes0.5and omittedsearch_modebecomesFAST. - The response uses
bbox, not a separate landmark object. - Send a Bearer JWT in the
Authorizationheader. - The JSON sample illustrates the fields. A live call returns the record for the values you send.
- Do not send a cache-bypass flag. This page documents only the client parameters.
Sandbox
| Scenario | Parameters | Result |
|---|---|---|
| Record on file | image only | 200 with face_count, faces, imageDimensions, and engine. |
| Missing required value | Omit image | 409 MissingParameter. |
| Unknown value | min_score: 0.8, search_mode: "ACCURATE" | 200 using the score and mode you sent. |
401 when the bearer token is missing or rejected.