Guides

๐Ÿ“จ [POST] Search Face

Retrieve the same Face as the submitted image.

Type : POST

Input Data (Body):

KeyFormatRequiredDescription
collectionIdstringOThe unique ID of the collection whose Face you want to look up.
requestNamestringOThe name that matches the Face image.
faceImagestring (Base 64)OThe base64 string of the Face image.

Output Data:

KeyFormatDescription
messagestringThe success or error message.
searchIdstringThe unique ID of the search request.
requestNamestringThe name submitted in the search request.
faceIdListArrayAn array of unique IDs of the faces that matched the submitted image.
faceIdList[i]stringThe unique ID of each face.
optionobjectThe options object applied to the search request.
option.option_livenessbooleanWhether the liveness option is applied.
option.liveNess_thresholdnumberLiveness option threshold.
option.liveNessScorenumberLiveness result score.
option.policy_similaritynumberSimilarity option threshold.

Error (403)

Error codeError messageDescription
6039API Key is required.Missing API Key: x-api-key is missing in header
6040Access Denied: API Key is unavailable.Unregistered API Key: Access restriction

Error (400)

Error codeError messageDescription
6030CollectionId is required.CollectionId is missing
6031RequestName is required.requestName is missing
6032Invalid face image.faceImage is missing
6033Cannot find collection info.If the collection information doesn't exist
6034This collection is unavailable.The collection has already been deleted
6035Failed to validate liveness of faceWhen a liveness error occurs
6036Image size is too large.Image is too large
6037Not supported image format.Image is not formatted correctly
6038Fail to search faceUnspecified errors
  • Request Headers
x-api-key : "string"
  • Request Data
{
    "collectionId" : "string",
    "faceImage" : "string",
		"userName" : "string"
}
  • Response
{
    "message": "success",
    "searchId": "string",
    "userName": "string",
    "option": {
        "option_liveness": Boolean,
        "liveNess_threshold": number,
        "liveNessScore": number,
        "policy_similarity": number
    },
    "faceIdList": [
        "string"
    ]
}
  • Error Response
{
   errorCode: number,
   message: "string"
}