Add Template
This API allows you to fill your database with selfie images or photo images of customers.
Endpoint
POST https://cloud.ooto-ai.com/api/v1.0/add
Request body (multipart/form-data)
templateId: (UUID) Unique identificator. (optional)
photo: (File) The selfie image file.
Query Parameters (optional)
check_liveness (Boolean | Default false)
check_deepfake (Boolean | Default false)
Authentication
APP-ID: Your application's unique identifier.
APP-KEY: Your application's authentication key.
Example
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.
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"
}
}
Last updated