SmartFace REST API (v5_4.27.0.6834)

Download OpenAPI specification:Download

Face

Checks liveness of one face on the given image.

Supported values for FaceDetectorResourceId are:

cpu, gpu, any, accurate_cpu, accurate_gpu, accurate_any
        

Supported values for SpoofDetectorResourceId are:

liveness_distant_any_remote, liveness_distant_cpu_remote, liveness_distant_gpu_remote
liveness_nearby_any_remote, liveness_nearby_cpu_remote, liveness_nearby_gpu_remote


SpoofCheckConfig.KeepEvaluatingConditionsAfterFirstFail is used

to evaluate all conditions supplied with Nearby/Distant LivenessConditions.

When true it can have slight performance impact, because all conditions are evaluated

Request Body schema:

Request containing reference image to be checked and configuration.

required
object (ImageData)
object (FaceSearchDetectorConfig)
faceDetectorResourceId
string
Default: "cpu"
spoofDetectorResourceIds
Array of strings
Default: ["liveness_distant_cpu_remote"]
object (SpoofCheckConfig)

Responses

Request samples

Content type
{
  • "image": {
    },
  • "faceDetectorConfig": {
    },
  • "faceDetectorResourceId": "cpu",
  • "spoofDetectorResourceIds": [
    ],
  • "spoofCheckConfig": {
    }
}

Response samples

Content type
application/json
{
  • "performed": true,
  • "passed": true,
  • "distantLivenessSpoofCheck": {
    },
  • "nearbyLivenessSpoofCheck": {
    }
}

Calculates confidence that two faces on sent photos belong to the same person.

Supported values for FaceDetectorResourceId are:

cpu, gpu, any, accurate_cpu, accurate_gpu, accurate_any
        

Supported values for TemplateGeneratorResourceId are:

cpu, gpu, any
Request Body schema:

Request containing images with faces to be compared

required
object (FaceProbe)
required
object (FaceProbe)

Responses

Request samples

Content type
{
  • "probeImage": {
    },
  • "referenceImage": {
    }
}

Response samples

Content type
application/json
{
  • "confidence": 0.1,
  • "probeFaceDetails": {
    },
  • "referenceFaceDetails": {
    }
}

Image

Retrieves the image by its Id.

Two optional parameters can be specified that allow the image to be resize to given values. More specifically, minSize will resize the smaller edge to minSize, maxSize will resize the larger edge to maxSize.

path Parameters
id
required
string <uuid>

Id of the image.

query Parameters
minSize
integer <int32>

Minimum size of the smaller edge.

maxSize
integer <int32>

Maximum size of the larger edge.

Responses

Version

Retrieves the version information.

Responses

Response samples

Content type
application/json
{
  • "databaseVersion": "string",
  • "databaseVersionCreationTime": "2019-08-24T14:15:22Z",
  • "databaseVersionUpdatedTime": "2019-08-24T14:15:22Z",
  • "assemblyVersion": "string",
  • "assemblyLastModifiedTime": "2019-08-24T14:15:22Z",
  • "fullVersion": "string"
}

Watchlist

Retrieves the watchlists as a paged collection.

Page number, page size and sorting order can be specified. You can also show total items count.

query Parameters
Ascending
boolean
PageNumber
integer <int32> [ 1 .. 2147483647 ]
PageSize
integer <int32> [ 1 .. 2147483647 ]
ShowTotalCount
boolean

Responses

Response samples

Content type
application/json
{
  • "totalItemsCount": 0,
  • "items": [
    ],
  • "pageSize": 0,
  • "pageNumber": 0,
  • "previousPage": "string",
  • "nextPage": "string"
}

Creates a new watchlist.

When setting PreviewColor, hexadecimal format is necessary to use, e.g. #012abc or #01a.

Request Body schema:

Request containing watchlist name and threshold.

displayName
required
string [ 0 .. 200 ] characters
fullName
required
string [ 0 .. 200 ] characters
threshold
integer <int32> [ 0 .. 100 ]
previewColor
string or null

Responses

Request samples

Content type
{
  • "displayName": "string",
  • "fullName": "string",
  • "threshold": 100,
  • "previewColor": "string"
}

Response samples

Content type
application/json
{
  • "displayName": "string",
  • "fullName": "string",
  • "threshold": 0,
  • "previewColor": "string",
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Upserts the watchlist.

If the watchlist with specified Id does not exist, it creates it with the requested Id. If the watchlist with specified Id exists, it updates it.
When setting PreviewColor, hexadecimal format is necessary to use, e.g. #012abc or #01a.

Request Body schema:

Request containing watchlist properties.

id
required
string
displayName
required
string [ 0 .. 200 ] characters
fullName
required
string [ 0 .. 200 ] characters
threshold
integer <int32> [ 0 .. 100 ]
previewColor
string or null

Responses

Request samples

Content type
{
  • "id": "string",
  • "displayName": "string",
  • "fullName": "string",
  • "threshold": 100,
  • "previewColor": "string"
}

Response samples

Content type
application/json
{
  • "displayName": "string",
  • "fullName": "string",
  • "threshold": 0,
  • "previewColor": "string",
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Retrieves the watchlist by its id.

path Parameters
id
required
string

Id of the watchlist.

Responses

Response samples

Content type
application/json
{
  • "displayName": "string",
  • "fullName": "string",
  • "threshold": 0,
  • "previewColor": "string",
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Deletes a watchlist by its id.

path Parameters
id
required
string

Id of the watchlist.

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "instance": "string",
  • "property1": null,
  • "property2": null
}

Retrieves the watchlist members belonging to a watchlist with specified watchlist id as a paged collection.

Page number, page size and sorting order can be specified. You can also show total items count.

path Parameters
id
required
string

Id of the watchlist.

query Parameters
Ascending
boolean
PageNumber
integer <int32> [ 1 .. 2147483647 ]
PageSize
integer <int32> [ 1 .. 2147483647 ]
ShowTotalCount
boolean

Responses

Response samples

Content type
application/json
{
  • "totalItemsCount": 0,
  • "items": [
    ],
  • "pageSize": 0,
  • "pageNumber": 0,
  • "previousPage": "string",
  • "nextPage": "string"
}

Searches the specified watchlists for matches with the given image.

Supported values for FaceDetectorResourceId are:

cpu, gpu, any, accurate_cpu, accurate_gpu, accurate_any
        

Supported values for TemplateGeneratorResourceId are:

cpu, gpu, any
        

Supported values for SpoofDetectorResourceId are:

none,
liveness_distant_any_remote, liveness_distant_cpu_remote, liveness_distant_gpu_remote
liveness_nearby_any_remote, liveness_nearby_cpu_remote, liveness_nearby_gpu_remote
Request Body schema:

Request containing searching image and ids of watchlists to be searched.

required
object (ImageData)
watchlistIds
Array of strings or null
Default: ["sample_watchlist_id"]
threshold
integer <int32>
Default: 40
maxResultCount
integer <int32>
Default: 1
object (FaceDetectorConfig)
faceDetectorResourceId
string
Default: "cpu"
templateGeneratorResourceId
string
Default: "cpu"
object (FaceMaskConfidenceRequest)
object (WatchlistSearchFaceFeaturesRequestConfig)
spoofDetectorResourceIds
Array of strings
Default: ["none"]
object (WatchlistSpoofCheckConfig)

Responses

Request samples

Content type
{
  • "image": {
    },
  • "watchlistIds": [
    ],
  • "threshold": 40,
  • "maxResultCount": 1,
  • "faceDetectorConfig": {
    },
  • "faceDetectorResourceId": "cpu",
  • "templateGeneratorResourceId": "cpu",
  • "faceMaskConfidenceRequest": {
    },
  • "faceFeaturesConfig": {
    },
  • "spoofDetectorResourceIds": [
    ],
  • "spoofCheckConfig": {
    }
}

Response samples

Content type
application/json
[
  • {
    }
]

WatchlistMember

Retrieves the watchlist members as a paged collection.

Page number, page size and sorting order can be specified. You can also show total items count.

query Parameters
Ascending
boolean
PageNumber
integer <int32> [ 1 .. 2147483647 ]
PageSize
integer <int32> [ 1 .. 2147483647 ]
ShowTotalCount
boolean

Responses

Response samples

Content type
application/json
{
  • "totalItemsCount": 0,
  • "items": [
    ],
  • "pageSize": 0,
  • "pageNumber": 0,
  • "previousPage": "string",
  • "nextPage": "string"
}

Creates a new watchlist member.

Request Body schema:

Request specifying watchlist member properties.

displayName
string or null [ 0 .. 200 ] characters
fullName
string or null [ 0 .. 200 ] characters
note
string or null
Array of objects or null (Label)

Responses

Request samples

Content type
{
  • "displayName": "string",
  • "fullName": "string",
  • "note": "string",
  • "labels": [
    ]
}

Response samples

Content type
application/json
{
  • "displayName": "string",
  • "fullName": "string",
  • "note": "string",
  • "labels": [
    ],
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Upserts the watchlist member.

If the watchlist member with specified Id does not exist, it creates it with the requested Id. If the watchlist member with specified Id exists, it updates it.

Request Body schema:

Request specifying which watchlist member should be updated and how to update it.

id
required
string
displayName
string or null [ 0 .. 200 ] characters
fullName
string or null [ 0 .. 200 ] characters
note
string or null
Array of objects or null (Label)

Responses

Request samples

Content type
{
  • "id": "string",
  • "displayName": "string",
  • "fullName": "string",
  • "note": "string",
  • "labels": [
    ]
}

Response samples

Content type
application/json
{
  • "displayName": "string",
  • "fullName": "string",
  • "note": "string",
  • "labels": [
    ],
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Retrieves the watchlist member by its id.

path Parameters
id
required
string

Id of the watchlist member.

Responses

Response samples

Content type
application/json
{
  • "displayName": "string",
  • "fullName": "string",
  • "note": "string",
  • "labels": [
    ],
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Deletes a watchlist member by its id.

path Parameters
id
required
string

Id of the watchlist member.

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "instance": "string",
  • "property1": null,
  • "property2": null
}

Retrieves faces for given watchlist member id as a paged collection.

Page number, page size and sorting order can be specified. You can also show total items count.

path Parameters
id
required
string

Id of the watchlist member.

query Parameters
Ascending
boolean
PageNumber
integer <int32> [ 1 .. 2147483647 ]
PageSize
integer <int32> [ 1 .. 2147483647 ]
ShowTotalCount
boolean

Responses

Response samples

Content type
application/json
{
  • "totalItemsCount": 0,
  • "items": [
    ],
  • "pageSize": 0,
  • "pageNumber": 0,
  • "previousPage": "string",
  • "nextPage": "string"
}

Links specified watchlist members to a given watchlist.

Request Body schema:

Request specifying watchlist member ids and watchlist id

watchlistId
required
string
watchlistMembersIds
required
Array of strings non-empty

Responses

Request samples

Content type
{
  • "watchlistId": "string",
  • "watchlistMembersIds": [
    ]
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "instance": "string",
  • "property1": null,
  • "property2": null
}

Unlinks specified watchlist members for a given watchlist.

Request Body schema:

Request specifying watchlist member ids and watchlist id

watchlistId
required
string
watchlistMembersIds
required
Array of strings non-empty

Responses

Request samples

Content type
{
  • "watchlistId": "string",
  • "watchlistMembersIds": [
    ]
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "instance": "string",
  • "property1": null,
  • "property2": null
}

Registers a watchlist member.

Supported values for FaceDetectorResourceId are:

cpu, gpu, any, accurate_cpu, accurate_gpu, accurate_any

Supported values for TemplateGeneratorResourceId are:

cpu, gpu, any
Request Body schema:

Request specifying watchlist member register details.

id
required
string
Default: ""
required
Array of objects (RegistrationImageData) non-empty
watchlistIds
required
Array of strings non-empty
Default: ["sample_watchlist_id"]
object (FaceDetectorConfig)
faceDetectorResourceId
string
Default: "cpu"
templateGeneratorResourceId
string
Default: "cpu"
keepAutoLearnPhotos
boolean
Default: false
displayName
string or null
fullName
string or null
note
string or null
Array of objects or null (Label)
Default: null

Responses

Request samples

Content type
{
  • "id": "",
  • "images": [
    ],
  • "watchlistIds": [
    ],
  • "faceDetectorConfig": {
    },
  • "faceDetectorResourceId": "cpu",
  • "templateGeneratorResourceId": "cpu",
  • "keepAutoLearnPhotos": false,
  • "displayName": "string",
  • "fullName": "string",
  • "note": "string",
  • "labels": null
}

Response samples

Content type
application/json
{
  • "watchlists": [
    ],
  • "faces": [
    ],
  • "displayName": "string",
  • "fullName": "string",
  • "note": "string",
  • "labels": [
    ],
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Adds a specified face to a given watchlist member.

path Parameters
id
required
string

The watchlist member id.

Request Body schema:

Request specifying face id to add.

faceId
required
string <uuid>

Responses

Request samples

Content type
{
  • "faceId": "b12fe1ff-6e7b-48d0-b0e3-b407b5f728e2"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "instance": "string",
  • "property1": null,
  • "property2": null
}

Adds a specified face to a given watchlist member.

Supported values for FaceDetectorResourceId are:

cpu, gpu, any, accurate_cpu, accurate_gpu, accurate_any
        

Supported values for TemplateGeneratorResourceId are:

cpu, gpu, any
path Parameters
id
required
string

The watchlist member id.

Request Body schema:

The image with face to add with configuration.

required
object (RegistrationImageData)
object (FaceDetectorConfig)
faceDetectorResourceId
string
templateGeneratorResourceId
string

Responses

Request samples

Content type
{
  • "imageData": {
    },
  • "faceDetectorConfig": {
    },
  • "faceDetectorResourceId": "string",
  • "templateGeneratorResourceId": "string"
}

Response samples

Content type
application/json
{
  • "trackletId": "18b0bea4-b937-4751-a328-bee6bf88d141",
  • "quality": 0,
  • "templateQuality": 0,
  • "state": "New",
  • "imageDataId": "b24530bd-cd48-48ab-ad8c-8f8a9678282e",
  • "processedAt": "2019-08-24T14:15:22Z",
  • "cropLeftTopX": 0.1,
  • "cropLeftTopY": 0.1,
  • "cropRightTopX": 0.1,
  • "cropRightTopY": 0.1,
  • "cropLeftBottomX": 0.1,
  • "cropLeftBottomY": 0.1,
  • "cropRightBottomX": 0.1,
  • "cropRightBottomY": 0.1,
  • "leftEyeX": 0.1,
  • "leftEyeY": 0.1,
  • "rightEyeX": 0.1,
  • "rightEyeY": 0.1,
  • "frameId": "64f96310-c601-4761-a13a-8f7335bbd0b0",
  • "type": "Regular",
  • "age": 0.1,
  • "gender": 0.1,
  • "faceMaskConfidence": 0.1,
  • "noseTipConfidence": 0.1,
  • "faceMaskStatus": "Unknown",
  • "faceArea": 0.1,
  • "size": 0.1,
  • "faceOrder": 0,
  • "facesOnFrameCount": 0,
  • "faceAreaChange": 0.1,
  • "yawAngle": 0.1,
  • "pitchAngle": 0.1,
  • "rollAngle": 0.1,
  • "autolearnClusterType": "string",
  • "sharpness": 0.1,
  • "brightness": 0.1,
  • "tintedGlasses": 0.1,
  • "heavyFrame": 0.1,
  • "glassStatus": 0.1,
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Removes a face from a watchlist member.

path Parameters
id
required
string

The watchlist member id.

Request Body schema:

Request specifying face id to remove.

faceId
required
string <uuid>

Responses

Request samples

Content type
{
  • "faceId": "b12fe1ff-6e7b-48d0-b0e3-b407b5f728e2"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "instance": "string",
  • "property1": null,
  • "property2": null
}