How to call the API
Requests and responses are exchanged as JSON over standard HTTP methods — GET, POST, PUT and DELETE.
This chapter covers the most-used endpoints in five groups, plus object and pedestrian detection:
- Watchlist management
- Watchlist members
- Identification
- Verification
- Liveness
The API is served over HTTP, by default on port 8098 of the deployment. Every deployment ships a Swagger web interface that documents all endpoints and lets you call them:
- Open the server on its API port — for example
http://localhost:8098— to browse the endpoint groups. Expand a group, pick an endpoint, and review its parameters and responses. - Use Try it out → Execute to call an endpoint from the browser and see the response.
You can also call the API from code, in any language with an HTTP client.
Watchlist management
A watchlist is the server-side gallery a probe is matched against.
Retrieve all watchlists
GET /
Lists all watchlists. The output is paginated: you can set the page number, page size and sort order, and ask for the total count. For example, an ascending page of 10 with the total count:
http://localhost:8098/api/v1/Watchlists?Ascending=true&PageSize=10&ShowTotalCount=true
Each watchlist in the response includes:
threshold— the default threshold applied to the matching score for faces.palmThreshold— the default threshold applied to the matching score for palms.previewColor— the display colour of the watchlist name, in hexadecimal (for example#012abc). The service itself does not use it.id— the unique identifier of the watchlist. Use this value whenever a request refers to a watchlist.
Retrieve one watchlist
GET /
Retrieves a single watchlist by its id:
http://localhost:8098/api/v1/Watchlists/8f02f8b6-dd02-4dd1-bc24-bc559ce16705
Create a watchlist
POST /
Creates a watchlist. Set displayName, fullName, threshold, palmThreshold and previewColor. The recommended defaults are 40 for the face threshold and 75 for the palm threshold; adjust them to your needs.
Change a watchlist
PUT /
Updates a watchlist. If no watchlist with the given id exists, one is created with the parameters supplied. The parameters are the same as for creating a watchlist.
Delete a watchlist
DELETE /
Deletes a watchlist by its id. Its members are not deleted; remove them directly if you need to.
Watchlist members
A watchlist member is one enrolled identity. A member can belong to more than one watchlist.
List all members
GET /
Returns a paged list of all watchlist members, which you can sort and split into pages of the size you need.
{
"totalItemsCount": null,
"items": [
{
"displayName": "John Wick",
"fullName": "John Wick",
"note": null,
"labels": [],
"id": "45d9843b-6776-4f9c-a000-90da442420f0",
"createdAt": "2022-10-05T12:53:47.726661Z",
"updatedAt": "2022-10-05T12:53:56.620247Z"
},
{
"displayName": "James Bond",
"fullName": "James Bond",
"note": "",
"labels": [],
"id": "03e4a2d6-98f6-4565-8081-e75bbb9efb34",
"createdAt": "2022-10-26T11:44:37.456912Z",
"updatedAt": null
}
],
"pageSize": 2,
"pageNumber": 1,
"previousPage": null,
"nextPage": null
}
Get one member
GET /
Returns one member by its id, which you can get from the list of all members.
Members of a watchlist
GET /
Returns the members linked to one watchlist. You need the watchlist id, which GET /api/v1/Watchlists returns.
Register a member
POST /
Registers a watchlist member. Enrolment can be from a face image, a palm image or without an image; with a custom id; into one or more watchlists; and with conditions that must be met for the enrolment to go through.
If you preset an id, the member gets it; otherwise one is assigned automatically:
"id": "custom-id",
Send the member's biometric as a base64-encoded image in images.data. Base64 represents binary data as text, which is how an image travels over a REST API:
"images": [
{
"modality": "Face",
"faceId": null,
"palmId": null,
"data": "<base64-encoded image>"
}
],
Choose at least one watchlist to enrol into; several are allowed:
"watchlistIds": [
"watchlist-id-one", "watchlist-id-two"
],
The detector settings guard enrolment quality, so low-resolution or otherwise poor images are rejected. Face and palm detectors share the same attributes: minFaceSize and maxFaceSize (minPalmSize and maxPalmSize) bound the accepted size, maxFaces and maxPalms cap how many are processed per image — so several people can be enrolled from one image — and confidenceThreshold sets the minimum detection quality.
"faceDetectorConfig": {
"minFaceSize": 30,
"maxFaceSize": 600,
"maxFaces": 20,
"confidenceThreshold": 1450
},
"palmDetectorConfig": {
"minPalmSize": 200,
"maxPalmSize": 1200,
"maxPalms": 20,
"confidenceThreshold": 5000
}
You can also attach custom labels to a member at enrolment. A label has to be defined once before it is used.
Link and unlink members
POST /
POST /
Adds a list of members to a watchlist, or removes them from it. Membership can be changed at any time after registration.
Delete a member
DELETE /
Removes a member from the system completely, including from every watchlist it was enrolled into.
Identification
Identification answers "who is this?" by searching a probe against one or more watchlists, for faces or for palms. Detection, template extraction and matching all run in the background. A match counts when its score is above the matching threshold.
Face identification
POST /
Send an image to identify the people on it against the faces of watchlist members. A cropped image of each detected face is used for matching. A liveness check can run as part of the same call, without a separate request.
Face identification can also return additional attributes:
"faceFeaturesConfig": {
"age": true,
"gender": true,
"faceMask": true,
"noseTip": true,
"yawAngle": true,
"pitchAngle": true,
"rollAngle": true
}
The confidence threshold for detecting a face mask can be adjusted:
"faceMaskConfidenceRequest": {
"faceMaskThreshold": 3000
},
A full sample request, with image.data holding the base64-encoded image:
{
"image": {
"data": "<base64-encoded image>"
},
"watchlistIds": [
"sample_watchlist_id"
],
"threshold": 40,
"maxResultCount": 1,
"faceDetectorConfig": {
"minFaceSize": 35,
"maxFaceSize": 600,
"maxFaces": 20,
"confidenceThreshold": 450
},
"faceDetectorResourceId": "cpu",
"templateGeneratorResourceId": "cpu",
"faceMaskConfidenceRequest": {
"faceMaskThreshold": 3000
},
"faceFeaturesConfig": {
"age": true,
"gender": true,
"faceMask": true,
"noseTip": true,
"yawAngle": true,
"pitchAngle": true,
"rollAngle": true,
"sharpness": true,
"brightness": true,
"tintedGlasses": true,
"heavyFrame": true,
"glassStatus": true
},
"spoofDetectorResourceIds": [
"none"
],
"spoofCheckConfig": {
"distantLivenessScoreThreshold": 90,
"nearbyLivenessScoreThreshold": 90,
"distantLivenessConditions": "default",
"nearbyLivenessConditions": "default",
"keepEvaluatingConditionsAfterFirstFail": false
}
}
Search all watchlists
When you have no particular watchlist in mind, leave the watchlistIds array empty:
"watchlistIds": [
],
Search chosen watchlists
To search only some watchlists, list their ids in watchlistIds. GET /api/v1/Watchlists returns the ids:
"watchlistIds": [
"watchlist-id-first",
"watchlist-id-second",
"watchlist-id-third"
],
Get several candidates
maxResultCount is 1 by default, so you get only the best match above the threshold. To get a list of similar candidates, lower the threshold and raise the count — for example a threshold of 20 instead of 40, and a maxResultCount of 10 — to receive up to ten members who are likely similar to each other.
minFaceSize and maxFaceSize set the range of face sizes considered for identification. Smaller and larger detections are ignored.
Palm identification
POST /
Send a palm image to identify a person against the palms of watchlist members. As with faces, detection, extraction and matching run in the background, a cropped palm is used for matching, and a liveness check can run in the same call. A full sample request:
{
"image": {
"data": "<base64-encoded image>"
},
"watchlistIds": [
"sample_watchlist_id"
],
"threshold": 40,
"maxResultCount": 1,
"palmDetectorConfig": {
"minPalmSize": 200,
"maxPalmSize": 1200,
"maxPalms": 1,
"confidenceThreshold": 5000
},
"palmDetectorResourceId": "cpu",
"spoofDetectorResourceIds": [
"none"
],
"spoofCheckConfig": {
"livenessScoreThreshold": 85
}
}
Searching all or chosen watchlists and getting several candidates work exactly as for faces. minPalmSize and maxPalmSize set the range of palm sizes considered.
Verification
POST /
Verification answers "is this the person they claim to be?" — a one-to-one comparison, face only. It returns the confidence that two faces belong to the same person. Send probeImage and referenceImage as base64-encoded strings, and set the face detector configuration to guard the quality of both images.
Liveness
Passive liveness tells whether the biometric presented belongs to a real person, without asking them to do anything. It works for faces and palms, and runs either inside an identification call — through spoofDetectorResourceIds and spoofCheckConfig — or as a separate spoof check.
Object and pedestrian detection
POST /
The service can also detect pedestrians and objects in images. Send the image base64-encoded in the data field; depending on the resources used, the response lists the objects and pedestrians found. The detector is configurable — minimum and maximum sizes, how many are detected, confidence thresholds — and you can choose which categories of objects to detect.
Full reference
Every operation, parameter and response model is documented in the Swagger web interface of your deployment, on its API port.