Face Enrollment
Creates a new facial biometric template that can be used later for identity verification. This operation supports optional liveness and deepfake checks during enrollment.
Endpoint
POST https://cloud.ooto-ai.com/api/v1.0/add
Request Format
Method: POST
Content-Type: multipart/form-data
Query parameters: check_liveness, check_deepfake
Query Parameters
Name
Type
Required
Description
check_liveness
Boolean
No
Enable liveness check (default: false)
check_deepfake
Boolean
No
Enable deepfake check (default: false)
Form Data
Field
Type
Required
Description
photo
File
Yes
JPEG or PNG image containing exactly one face
templateId
String
No
Optional custom ID for the face template
Authentication Headers
APP-ID: Your application's unique identifier.
APP-KEY: Your application's authentication key.
Example Request (cURL)
curl -X POST --location 'https://cloud.ooto-ai.com/api/v1.0/add?check_liveness=true&check_deepfake=true' \
--header 'APP-ID: <put_app_id_here>' \
--header 'APP-KEY: <put_app_key_here>' \
--form 'photo=@"/path/to/photo"' \
--form 'templateId=<UUID>'
Replace «put_app_id_here», «put_app_key_here» with your actual credentials and the path to your selfie image.
Successful Response (HTTP 200)
{
"transactionId": "e0e6c2ad-d878-4a63-aebd-83e3aa4d5bf2",
"result": {
"templateId": "abb462cf-313f-448c-8dad-bcffbf61a825",
"face": {
"liveness": {
"score": 0.9617409657349469,
"fine": true
},
"deepfake": {
"score": 0.9506649971008301,
"fine": true
},
"quality": {
"age": 53,
"gender": "male",
"race": "white",
"pitch": 1.1083125695586205,
"yaw": 2.8647685423493385,
"roll": -0.3724324330687523,
"uniformity": {
"value": 0.6023820286550972,
"fine": true
},
"exposure": {
"value": 0.6384607939000536,
"fine": true
},
"contrast": {
"value": 0.7300203119130562,
"fine": true
},
"flare": {
"score": 0.08066436648368835,
"fine": true
},
"blur": {
"score": 0.00000974781323748175,
"fine": true
},
"macroblocks": {
"score": 0.000002921166924352292,
"fine": true
},
"distortion": {
"score": 0.7766090035438538,
"fine": true
},
"occlusion": {
"score": 0.004990775138139725,
"fine": true
},
"emotion": {
"score": 0.007249772548675537,
"fine": true
},
"left_eye_closed": {
"score": 0.0000040531158447265625,
"fine": true
},
"right_eye_closed": {
"score": 0.0017625093460083008,
"fine": true
},
"crfiqa": {
"score": 0.5990186929702759,
"fine": true
}
},
"box": {
"x": 708,
"y": 320,
"w": 957,
"h": 1424
},
"landmarks": [
[
963,
903
],
[
1366,
906
],
[
1173,
1139
],
[
1006,
1330
],
[
1326,
1334
]
]
}
}
}
Error response (HTTP 400)
{
"transactionId": "9191079a-4f80-4c8a-9a4b-528af2cfd3c4",
"result": {
"status": "error",
"code": 5,
"info": "can not detect face"
}
}
Engine Errors
Code
Info
1
photo should not be empty
2
wrong mime-type in input data
3
photo size is 0 bytes
4
can not decode image, check it is valid jpeg or png file
5
can not detect face
6
more than one face detected on photo
9
can not extract features from sample, probably it is too small
Best Practices
Use sharp, high-quality, frontal-face photos
Face size ≥ 200×200 pixels in image
Avoid masks, sunglasses, filters
Only one face must be present in the image
Last updated