Download OpenAPI specification:Download
Enface REST API server description. You can find out more about Enface at https://enface.ai.
email required | string <email> User's email address |
password required | string <password> >= 6 characters User's password |
valid_days | integer >= 1 Default: 1 Temporary token expiration days |
Successful user login response
Bad Request
Invalid user credentials
Enface API server
{- "email": "user@example.com",
- "password": "pa$$word",
- "valid_days": 1
}
{- "status": "ok",
- "token": "jwt.temporary.token"
}
Enface API server
[- {
- "id": "15979340-8293-11ea-8a91-30916e1c4b90",
- "expires": "2020-04-27T19:05:18.067Z"
}
]
Create a new permanent access token with valid days count or exact expiration time
valid_days required | number >= 1 Default: 1 Valid days count |
token | string <uuid> (AccessToken) User's permanent access token. If no temporary token provided in "token" header, this parameter is required. |
Created
Bad Request
Unauthorized
Enface API server
{- "expires": "never"
}
{- "status": "ok",
- "message": "new token created",
- "token": {
- "id": "1252cb60-88dc-11ea-b6b1-bc0e87309155",
- "expires": "2020-04-27T23:09:06.970Z"
}
}
Enface API server
[- {
- "created": "2021-02-20T13:51:00Z",
- "name": "string",
- "person_list_search": [
- {
- "id": "d995ca10-8292-11ea-ae65-3048e12b1113",
- "on_found": "",
- "on_failed": ""
}
], - "group_id": "string"
}
]
Create new data sources group
name required | string [ 1 .. 100 ] characters Data sources group name |
token | string <uuid> (AccessToken) User's permanent access token. If no temporary token provided in "token" header, this parameter is required. |
person_list_search | Array of objects (PersonListSearch) |
Created
Bad Request
Unauthorized
Enface API server
{- "name": "Office cameras",
- "person_list_search": [
- "1",
- "2"
]
}
{- "status": "ok",
- "message": "source group created",
- "group_id": "c2a61a30-8986-11ea-98f0-de0b10ae4112"
}
Create new data source
name required | string [ 1 .. 100 ] characters New source name |
group_id required | string <uuid> Source group id |
new_person_threshold | string Default: "never" Enum: "80" "85" "90" "95" "never" "no_match" New person creation match score threshold |
new_person_square_min | string Default: 112 Enum: "50" "112" "224" New person minimum square in pixels |
new_person_angle_max | string Default: 60 Enum: "5" "10" "20" "30" "40" "50" "60" "70" "80" New person maximum face angle |
person_list_add | string <uuid> Person list id to automatically add new persons to (regarding all auto-creation rules) |
token | string <uuid> (AccessToken) User's permanent access token. If no temporary token provided in "token" header, this parameter is required. |
feature_check | Array of strings (FeatureCheck) >= 0 items Items Enum: "gender" "age" "race" A list of features to detect on each found face. May be an array or just a single feature name. |
Created
Bad Request
Unauthorized
Enface API server
{- "group_id": "ef9b7d20-8899-11ea-862b-b2763602db0e",
- "name": "camera 1",
- "features_check": [
- "race",
- "gender",
- "age"
], - "new_person_threshold": "no_match",
- "new_person_square_min": 112,
- "new_person_angle_max": 60,
- "person_list_add": "d99a5df0-8292-11ea-b89f-db248d6ead66"
}
{- "status": "ok",
- "message": "source created",
- "source_id": "c2a61a30-8986-11ea-98f0-de0b10ae4112"
}
Get all data sources by group id
group_id required | string <uuid> Sources group id |
token | string <uuid> (AccessToken) User's permanent access token. If no temporary token provided in "token" header, this parameter is required. |
Ok
Unauthorized
Enface API server
{- "group_id": "d995ca10-8292-11ea-ae65-3048e12b1113"
}
[- {
- "source_id": "ef9b5611-8899-11ea-8a73-c13daa604682",
- "group_id": "c07b5811-828d-11ea-96e9-dba8e17ed50e",
- "created": "1970-01-01T00:00:00.000Z",
- "feature_check": [
- "race",
- "gender",
- "age"
], - "auto_person_create": {
- "new_person_threshold": "no_match",
- "new_person_square_min": 224,
- "new_person_angle_max": 50,
- "person_list_add": [
- "b9ab5811-828d-11ea-96e9-dba8e17ed531"
]
}, - "name": "Default source"
}
]
Create new persons list
New list name should be defined
name required | string [ 1 .. 100 ] characters New persons list name |
token | string <uuid> (AccessToken) User's permanent access token. If no temporary token provided in "token" header, this parameter is required. |
Created
Bad Request
Unauthorized
Enface API server
{- "name": "list name 1"
}
{- "list_id": "string",
- "status": "ok"
}
Enface API server
[- {
- "name": "Friends",
- "id": "75e55780-8943-11ea-9773-e96daa282099",
- "persons": 27
}
]
Create a new person in defined (of default) list using parameters
image required | string <binary> Image to process, can contain a lot of faces (check "multi" parameter value) |
list_id | string <uuid> New person list id. If this parameter is omitted, the person will be created (or replaced) in the default persons list. |
replace_person_id | string <uuid> Person id for replacement |
bbox | boolean (BBoxRequest) Default: false Return top-left and bottom-right rectangle coordinates for each face on the processed image |
bbox_pro | boolean (BBoxProRequest) Default: false Return 4 [x, y] rectangle coordinates for each face on the processed image |
fields | Array of strings (PersonFields) <= 2000000 items An array of strings to be stored with the person record regarding any business logic. This array is limited by 2 millions records of strings up to 64kb each. |
multi | boolean Default: false Create separate person instance for each face found on image. New person creation conditions are applied to each face separately. If this parameter is "false", the largest face on image will be processed. |
token | string <uuid> (AccessToken) User's permanent access token. If no temporary token provided in "token" header, this parameter is required. |
feature_check | Array of Array of strings (FeatureCheck) Items Enum: "gender" "age" "race" A list of features to detect on each found face. May be an array of features names or just a single feature name. |
new_person_threshold | string (NewPersonThreshold) Default: "no_match" Enum: "80" "85" "90" "95" "no_match" "never" New person creation match threshold, calculated for every "person_list_add" (or "default list", if no lists were provided). Value "no_match" will be automatically replaced with platform internal default - the optimal value, defined by complex neural network checks and tests (recommended). Value "never" means no person will be created in this action. |
drop_image | boolean Default: false Do not store the image in persons list. If this parameter is provided, only the face unpersonalized embedding will be stored. |
thumb | boolean (ThumbRequest) Default: false Return pre-processed thumb image for each found face (112x112 pixels, base64 encoded) |
new_person_yaw_max | integer Default: 30 Enum: "5" "10" "20" "30" "40" "50" "60" "70" "80" New person face maximum yaw angle |
new_person_square_min | integer Default: 112 Enum: "50" "112" "224" Person creation minimum face square side size in pixels |
Ok
Created
Bad Request
Unauthorized
Enface API server
{ "image": "binary", "list_id": "c8a97400-8a1b-11ea-bf7a-61a614d87933" }
{- "status": "ok",
- "message": "image format is unknown",
- "faces_total": 0,
- "spent": 97
}
Get person record by id
token | string <uuid> (AccessToken) User's permanent access token. If no temporary token provided in "token" header, this parameter is required. |
list_id | string <uuid> Person list id. If not specified, the default person list will be used. |
person_id required | string <uuid> Person id |
Ok
Bad Request
Unauthorized
Not Found
Enface API server
{- "token": "b9749cad-8b87-435b-84e3-c33e19e749ec",
- "list_id": "string",
- "person_id": "string"
}
{- "person_id": "55e2c7d0-951c-11ea-83be-36b62cef36f0",
- "list_id": "1ad22a7e-e5de-4a50-b066-d9f00f81ff5f",
- "created": "2021-02-20T13:51:00Z",
- "group_id": "a53910d3-44c6-40a7-98f0-0a93772495fa",
- "source_id": "ccf4c6ca-95f3-4d73-8819-13918497e59e",
- "status": "init",
- "features": [
- {
- "name": "age",
- "version": 1,
- "result": 36,
- "confidence": "99.85%",
- "spent": 23
}
], - "fields": [
- "Jim",
- "Carry",
- "21 Solter street",
- "New York"
], - "yaw": 0
}
Update person record
list_id | string <uuid> Person's list id. If this parameter is omitted, the person will be searched in the default persons list. |
fields | Array of strings (PersonFields) <= 2000000 items An array of strings to be stored with the person record regarding any business logic. This array is limited by 2 millions records of strings up to 64kb each. |
token | string <uuid> (AccessToken) User's permanent access token. If no temporary token provided in "token" header, this parameter is required. |
drop_image | boolean Default: false Remove person's image from database (if present). If this parameter is provided, only the face unpersonalized embedding will be stored. |
person_id required | string <uuid> Person id to update |
Ok
Bad Request
Unauthorized
Not Found
Enface API server
{- "list_id": "ec86f010-9550-11ea-b0cd-c00ad6c83721",
- "fields": [
- "Jim",
- "Carry",
- "21 Solter street",
- "New York"
], - "token": "b9749cad-8b87-435b-84e3-c33e19e749ec",
- "drop_image": false,
- "person_id": "a2202315-1fe6-442e-bf73-effdc079324d"
}
{- "message": "operation succeeded",
- "status": "ok"
}
Delete person from the list
list_id | string <uuid> Person's list id. If this parameter is omitted, the person will be searched in the default persons list. |
token | string <uuid> (AccessToken) User's permanent access token. If no temporary token provided in "token" header, this parameter is required. |
person_id required | string <uuid> Person id to delete |
Ok
Bad Request
Unauthorized
Not Found
Enface API server
{- "list_id": "ec86f010-9550-11ea-b0cd-c00ad6c83721",
- "token": "b9749cad-8b87-435b-84e3-c33e19e749ec",
- "person_id": "a2202315-1fe6-442e-bf73-effdc079324d"
}
{- "status": "ok",
- "message": "1 person(s) deleted"
}
Find all faces on 2 images and compare by similarity. JPEG and PNG formats are supported (up to 10Mb of data in one request).
images required | Array of strings <binary> 2 items 2 images to process, can contain a lot of faces (check "multi" parameter value) |
bbox | boolean (BBoxRequest) Default: false Return top-left and bottom-right rectangle coordinates for each face on the processed image |
bbox_pro | boolean (BBoxProRequest) Default: false Return 4 [x, y] rectangle coordinates for each face on the processed image |
multi | boolean Default: false Perform independent search for each face on image. If this parameter is "false", the largest face on image will be processed. |
token | string <uuid> (AccessToken) User's permanent access token. If no temporary token provided in "token" header, this parameter is required. |
thumb | boolean (ThumbRequest) Default: false Return pre-processed thumb image for each found face (112x112 pixels, base64 encoded) |
Ok
Bad Request
Unauthorized
Enface API server
{- "image1": [
- {
- "thumb": "string",
- "bbox": [
- [
- 34,
- 166
], - [
- 193,
- 108
]
], - "bbox_pro": [
- [
- 34,
- 166
], - [
- 193,
- 108
], - [
- 252,
- 268
], - [
- 92,
- 326
]
], - "compare": [
- {
- "same_person": true,
- "confidence": "98%"
}
]
}
], - "image2": [
- {
- "thumb": "string",
- "bbox": [
- [
- 34,
- 166
], - [
- 193,
- 108
]
], - "bbox_pro": [
- [
- 34,
- 166
], - [
- 193,
- 108
], - [
- 252,
- 268
], - [
- 92,
- 326
]
], - "compare": [
- {
- "same_person": true,
- "confidence": "98%"
}
]
}
], - "spent": 143,
- "status": "ok"
}
Find all faces on image(s) and detect various features for each face found. JPEG and PNG formats are supported (up to 10Mb of data in one request).
images required | Array of strings <binary> [ 1 .. 100 ] items Images to process, each image can contain a lot of faces (check "multi" parameter value) |
bbox | boolean (BBoxRequest) Default: false Return top-left and bottom-right rectangle coordinates for each face on the processed image |
bbox_pro | boolean (BBoxProRequest) Default: false Return 4 [x, y] rectangle coordinates for each face on the processed image |
multi | boolean (MultiRequest) Default: false Perform independent search for each face on image. If this parameter is "false", the largest face on image will be processed. |
token | string <uuid> (AccessToken) User's permanent access token. If no temporary token provided in "token" header, this parameter is required. |
feature_check | Array of strings (FeatureCheck) >= 0 items Items Enum: "gender" "age" "race" A list of features to detect on each found face. May be an array or just a single feature name. |
thumb | boolean (ThumbRequest) Default: false Return pre-processed thumb image for each found face (112x112 pixels, base64 encoded) |
Ok
Bad Request
Unauthorized
Enface API server
{- "spent": 143,
- "results": [
- {
- "thumb": "string",
- "bbox": [
- [
- 34,
- 166
], - [
- 193,
- 108
]
], - "score": 0,
- "features": [
- {
- "name": "age",
- "version": 1,
- "result": 36,
- "confidence": "99.85%",
- "spent": 23
}
]
}
], - "status": "ok"
}
Search for face(s) matches regarding various conditions. JPEG and PNG formats are supported (up to 10Mb of data in one request).
If there will be no "group_id" or "source_id" parameters specified, the default group and source settings will be applied.
If some of parameters:
If "new_person_threshold" value is "never", the values of "new_person_yaw_max", "new_person_square_min" and "person_list_add" parameters are ignored.
image required | string <binary> Image to process, can contain a lot of faces (check "multi" parameter value) |
bbox | boolean (BBoxRequest) Default: false Return top-left and bottom-right rectangle coordinates for each face on the processed image |
bbox_pro | boolean (BBoxProRequest) Default: false Return 4 [x, y] rectangle coordinates for each face on the processed image |
multi | boolean Default: false Perform independent search for each face found on image. Auto person creation conditions are applied to each face separately. If this parameter is "false", the largest face on image will be processed. |
token | string <uuid> (AccessToken) User's permanent access token. If no temporary token provided in "token" header, this parameter is required. |
feature_check | Array of strings (FeatureCheck) >= 0 items Items Enum: "gender" "age" "race" A list of features to detect on each found face. May be an array or just a single feature name. |
new_person_threshold | string (NewPersonThreshold) Default: "no_match" Enum: "80" "85" "90" "95" "no_match" "never" New person creation match threshold, calculated for every "person_list_add" (or "default list", if no lists were provided). Value "no_match" will be automatically replaced with platform internal default - the optimal value, defined by complex neural network checks and tests (recommended). Value "never" means no person will be created in this action. |
group_id | string <uuid> Action data source group id |
source_id | string <uuid> Action data source id |
person_list_search | Array of strings <uuid> Search for matches in defined person list(s). If omitted, the search will be performed in default person list only. |
results | integer [ 1 .. 100 ] Default: 1 How many person(s) matches to return. Results are sorted by distance. |
person_list_add | Array of strings <uuid> Default: "13814001-1dd2-11b2-b619-5502c27ed19c" Automatically create persons in defined list(s). This parameter is required for person creation. |
drop_image | boolean Default: false Do not store the image in actions history. |
thumb | boolean (ThumbRequest) Default: false Return pre-processed thumb image for each found face (112x112 pixels, base64 encoded) |
new_person_yaw_max | integer Default: 30 Enum: "5" "10" "20" "30" "40" "50" "60" "70" "80" New person face maximum yaw angle |
new_person_square_min | integer Default: 112 Enum: "50" "112" "224" Person creation minimum face square side size in pixels |
Created
Bad Request
Unauthorized
Enface API server
{ "token": "98ace0d0-94a6-11ea-abc1-d1365b6aa8d4", "image": "<binary>" }
{- "status": "ok"
}