Domain name for API request: iai.intl.tencentcloudapi.com.
Create a person and add a human face, name, sex, and other information related to the person.
- Please use the V3 version of the signature method in public parameters. In other words, set the SignatureMethod parameter to TC3-HMAC-SHA256.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreatePerson. |
| Version | Yes | String | Common Params. The value used for this API: 2020-03-03. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-jakarta, ap-nanjing, ap-shanghai, ap-singapore. |
| GroupId | Yes | String | ID of the personnel database to be added, which is the GroupId in the API for creating a personnel database. |
| PersonName | Yes | String | Person name. [1, 60] characters, modifiable, repeatable. |
| PersonId | Yes | String | Person ID.
|
| Gender | No | Integer | Gender.
|
| PersonExDescriptionInfos.N | No | Array of PersonExDescriptionInfo | Person description field content, key-value. [0, 60] characters, modifiable, repeatable. |
| Image | No | String | base64 image data.
|
| Url | No | String | Image Url.
|
| UniquePersonControl | No | Integer | This parameter is used to control whether the human face contained in the image specified by Image or Url is determined to be a suspected duplicate person already existing in the person library.
|
| QualityControl | No | Integer | Image quality control.
|
| NeedRotateDetection | No | Integer | Whether to enable image rotation recognition support.
|
| Encryption | No | Encryption | Whether to encrypt the entire request body. Supported encryption algorithm: AES-256-CBC. Users with encryption requirements can use this parameter. |
| EncryptedBody | No | String | Encrypted ciphertext. The data format before encryption is as follows: {"Url":"","Image":""}. |
| Parameter Name | Type | Description |
|---|---|---|
| FaceId | String | Unique ID of the face image. |
| FaceRect | FaceRect | Position of the detected face frame. |
| SimilarPersonId | String | PersonId of the suspected duplicate person.
|
| FaceModelVersion | String | Algorithm model version used for face recognition. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
https://iai.intl.tencentcloudapi.com/?Action=CreatePerson
&GroupId=ZhuYuanDormitoryNo1
&PersonName=Junly
&PersonId=2001
&Gender=1
&Url=http://test.image.myqcloud.com/testB.jpg
&PersonExDescriptionInfos.0.PersonExDescriptionIndex=0
&PersonExDescriptionInfos.0.PersonExDescription=School of Computer Science
&PersonExDescriptionInfos.1.PersonExDescriptionIndex=1
&PersonExDescriptionInfos.1.PersonExDescription=software engineering
&PersonExDescriptionInfos.2.PersonExDescriptionIndex=2
&PersonExDescriptionInfos.2.PersonExDescription=Level 15
&PersonExDescriptionInfos.3.PersonExDescriptionIndex=3
&PersonExDescriptionInfos.3.PersonExDescription=3150808
&<Common request parameters>
{
"Response": {
"FaceId": "3454816969590585885",
"SimilarPersonId": "",
"FaceRect": {
"X": 172,
"Y": 122,
"Width": 178,
"Height": 228
},
"FaceModelVersion": "3.0",
"RequestId": "738a2fb0-bd4b-4cf6-9c91-18d50978d76b"
}
}
https://iai.intl.tencentcloudapi.com/?Action=CreatePerson
&GroupId=ZhuYuanDormitoryNo1
&PersonName=Cheng
&PersonId=1001
&Gender=2
&Url=http://test.image.myqcloud.com/testD.jpg
&<Common request parameters>
{
"Response": {
"Error": {
"Code": "InvalidParameterValue.PersonIdAlreadyExist",
"Message": "The person ID already exists. Person IDs cannot be repeated."
},
"RequestId": "76dedef7-af27-4a20-9064-c5ef3133926d"
}
}
https://iai.intl.tencentcloudapi.com/?Action=CreatePerson
&GroupId=ShenZhenCitizen
&PersonName=Siccy
&PersonId=3001
&Gender=2
&Url=http://test.image.myqcloud.com/testC.jpg
&<Common request parameters>
{
"Response": {
"Error": {
"Code": "InvalidParameterValue.GroupIdNotExist",
"Message": "The personnel database ID does not exist."
},
"RequestId": "dfa512fc-fd07-4bf1-a292-cb497b620857"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| AuthFailure.InvalidAuthorization | Authentication fail. |
| FailedOperation.ConflictOperation | Operation conflict. Do not perform simultaneous operations on the same Person. |
| FailedOperation.CreateFaceConcurrent | Adding a face does not support concurrent operations. |
| FailedOperation.DecryptSystemError | Decryption failed. |
| FailedOperation.DuplicatedGroupDescription | Custom description fields in the same person library cannot be repeated. |
| FailedOperation.FaceQualityNotQualified | Face image quality does not meet the requirements. |
| FailedOperation.FaceSizeTooSmall | Face frame size is less than the MinFaceSize setting. The human face is filtered. |
| FailedOperation.GroupInDeletedState | The current group is being deleted. Please wait. |
| FailedOperation.GroupPersonMapExist | The group already contains the corresponding Personnel Id. |
| FailedOperation.GroupPersonMapNotExist | The group does not include the corresponding personnel Id. |
| FailedOperation.ImageDecodeFailed | Image decoding failed. |
| FailedOperation.ImageDownloadError | Image download error. |
| FailedOperation.ImageFacedetectFailed | Face detection failed. |
| FailedOperation.ImageResolutionExceed | The image resolution is too high. |
| FailedOperation.ImageResolutionTooSmall | The short edge resolution of the image is lower than 64 pixels. |
| FailedOperation.ImageSizeExceed | The size of the image after base64 encoding cannot exceed 5 MB. |
| FailedOperation.RequestLimitExceeded | Request frequency exceeds the limit. |
| FailedOperation.RequestTimeout | The backend service timed out. |
| FailedOperation.SearchFacesExceed | The number of human faces to retrieve exceeds the limit. |
| FailedOperation.ServerError | Algorithm service exception. Retry. |
| InternalError | Internal error. |
| InvalidParameter.InvalidParameter | Invalid parameters. |
| InvalidParameterValue.AccountFaceNumExceed | Number of faces of the account exceeds the limit. |
| InvalidParameterValue.DeleteFaceNumExceed | Number of faces to delete exceeds the limit. Each person must contain at least one face. |
| InvalidParameterValue.GroupExDescriptionsExceed | The customized description field array of the person library exceeds the length limit. You can create up to 5. |
| InvalidParameterValue.GroupExDescriptionsNameIdentical | The custom description field name in the person library cannot be repeated. |
| InvalidParameterValue.GroupExDescriptionsNameIllegal | The person library custom description field name contains invalid characters. The person library custom description field name supports only Chinese, English, -, _, and digits. |
| InvalidParameterValue.GroupExDescriptionsNameTooLong | The custom description field name of a person library exceeds the length limit. |
| InvalidParameterValue.GroupFaceNumExceed | Number of faces in the person library exceeds the limit. |
| InvalidParameterValue.GroupIdAlreadyExist | Personnel database ID already exists. Personnel database ID cannot be repeated. |
| InvalidParameterValue.GroupIdIllegal | The personnel database ID contains invalid characters. It can only contain letters, digits, and -%@#&_. |
| InvalidParameterValue.GroupIdNotExist | The personnel database ID does not exist. |
| InvalidParameterValue.GroupIdTooLong | Personnel database ID exceeds the length limit. |
| InvalidParameterValue.GroupIdsExceed | The passed-in person library list exceeds the limit. |
| InvalidParameterValue.GroupNameAlreadyExist | Person library name already exists. Person library name cannot be repeated. |
| InvalidParameterValue.GroupNameIllegal | The personnel database name contains invalid characters. It can only contain Chinese characters, English letters, hyphens (-), underscores (_), and digits. |
| InvalidParameterValue.GroupNameTooLong | Personnel database name exceeds the length limit. |
| InvalidParameterValue.GroupNumExceed | The number of face libraries exceeds the limit. To add more, contact us. |
| InvalidParameterValue.GroupNumPerPersonExceed | The number of person libraries exceeds the limit. A single person can be added to up to 100 person libraries. |
| InvalidParameterValue.GroupTagIllegal | Personnel database remarks contain invalid characters. Personnel database remarks support only Chinese, English, -, _, and digits. |
| InvalidParameterValue.GroupTagTooLong | Personnel database remarks exceed the length limit. |
| InvalidParameterValue.ImageEmpty | No image is input. |
| InvalidParameterValue.InvalidParameter | Invalid encryption parameters. |
| InvalidParameterValue.LimitExceed | Number of returned results exceeds the limit. |
| InvalidParameterValue.NoFaceInGroups | The specified group contains no human face. |
| InvalidParameterValue.NoFaceInPhoto | The image contains no human face. |
| InvalidParameterValue.OffsetExceed | Starting number is too large. Please check the required length of the array. |
| InvalidParameterValue.PersonExDescriptionInfosExceed | The customized description field array of a person exceeds the length limit. A maximum of 5 is allowed. |
| InvalidParameterValue.PersonExDescriptionsNameIdentical | The custom description field name of a person cannot be repeated. |
| InvalidParameterValue.PersonExDescriptionsNameIllegal | The custom description field name contains invalid characters. The custom description field name supports only Chinese, English, -, _, and digits. |
| InvalidParameterValue.PersonExDescriptionsNameTooLong | The custom description field name of a person exceeds the length limit. |
| InvalidParameterValue.PersonFaceNumExceed | The number of human faces for a single person exceeds the limit. A single person can include up to five faces. |
| InvalidParameterValue.PersonGenderIllegal | Error in the gender of personnel settings. 0 represents empty, 1 represents man, and 2 represents woman. |
| InvalidParameterValue.PersonIdAlreadyExist | Person ID already exists. Person ID cannot be repeated. |
| InvalidParameterValue.PersonIdIllegal | Person ID contains invalid characters. Person ID supports only English letters, digits, -%@#&_. |
| InvalidParameterValue.PersonIdNotExist | The personnel ID does not exist. |
| InvalidParameterValue.PersonIdTooLong | Person ID exceeds the length limit. |
| InvalidParameterValue.PersonNameIllegal | Person name contains invalid characters. Person name supports only Chinese and English, -, _, and digits. |
| InvalidParameterValue.PersonNameTooLong | Person name exceeds the length limit. |
| InvalidParameterValue.QualityControlIllegal | Invalid QualityControl parameter. |
| InvalidParameterValue.SearchPersonsExceed | The number of search personnel exceeds the limit. |
| InvalidParameterValue.UniquePersonControlIllegal | Invalid UniquePersonControl parameter. |
| InvalidParameterValue.UploadFaceNumExceed | Upload up to four human faces. |
| InvalidParameterValue.UrlIllegal | The URL format is invalid. |
| LimitExceeded.ErrorFaceNumExceed | Human face count exceeds the limit. |
| MissingParameter.ErrorParameterEmpty | The required parameter is empty. |
| ResourceInsufficient | Insufficient resources. |
| ResourceUnavailable.Delivering | The resource is being delivered. |
| ResourceUnavailable.Freeze | The account has been frozen. |
| ResourceUnavailable.InArrears | The account is in arrears. |
| ResourceUnavailable.LowBalance | Insufficient balance. |
| ResourceUnavailable.NotExist | The billing status is unknown. Check whether the service has been activated in the console. |
| ResourceUnavailable.Recover | The resource has been possessed. |
| ResourceUnavailable.StopUsing | Services for the account has been stopped. |
| ResourceUnavailable.UnknownStatus | The billing status is unknown. |
| ResourcesSoldOut.ChargeStatusException | The billing status is abnormal. |
| UnsupportedOperation.UnknowMethod | The method name is unknown. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários