Add a new face to a collection.
Key | Format | Required | Description |
---|
collectionId | string | Yes | Unique ID of the collection to add the face to. |
userName | string | Yes | Name associated with the face being added. |
faceImage | string (base64) | Yes | Base64 string of the face image. |
Key | Format | Description |
---|
message | string | The success or error message. |
faceId | string | The unique ID of the Face submission. |
metaFaceId | string | The unique ID of the corresponding Face. |
option | object | Options used history object. |
option.option_liveness | boolean | Whether the Liveness option is enabled or disabled. |
option.liveNess_threshold | number | The threshold for the Liveness option. |
livenessScore | number | The Liveness result score. |
Error code | Error message | Description |
---|
6039 | API Key is required. | Missing API Key: x-api-key is missing in header |
6040 | Access Denied: API Key is unavailable. | Unregistered API Key: Access restriction |
Error code | Error message | Description |
---|
6010 | CollectionId is required | CollectionId is missing |
6011 | WorkspaceId is required. | Face image missing |
6012 | Fail to add face. | Unspecified error |
6013 | Cannot find collection info. | If the collection information does not exist |
6014 | This collection is unavailable | The collection has already been deleted |
6015 | Failed to validate liveness of face | If a liveness error occurred |
6016 | Image size is too large. | Image is too large |
6017 | Not supported image format. | Image is not formatted correctly |
{
"faceImage" : "string",
"collectionId" : "string",
"userName" : "string"
}
{
"message": "success",
"faceId": "string",
"metaFaceId" : "string",
"option": {
"option_liveness": Boolean,
"liveNess_threshold": number,
"livenessScore": number
}
}
{
errorCode: number,
message: "string"
}