Domain name for API request: faceid.intl.tencentcloudapi.com.
Based on the multimodal AI large model algorithm, it provides anti-attack detection capabilities for facial images and videos. It can effectively identify highly simulated AIGC face-changing, high-definition remakes, batch black market attacks, watermarks and other attack traces, and enhance the anti-counterfeiting security capabilities of images and videos.
A maximum of 5 requests can be initiated per second for this API.
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: DetectAIFakeFaces. |
| Version | Yes | String | Common Params. The value used for this API: 2018-03-01. |
| Region | No | String | Common Params. This parameter is not required. |
| FaceInput | No | String | Import the face image or facial video to be detected (currently only single face detection is supported) in base64 encoding. If your scenario involves both video and image, we recommend using video for detection. For better detection results, please note the following input data limits and suggestions:
If you do not use Encryption for secure transmission, this field is a required parameter. |
| FaceInputType | No | Integer | Passed in type.
If you do not use Encryption for encrypting transmission, this field is mandatory. |
| Encryption | No | Encryption | Whether to encrypt the entire request information.
|
| EncryptedBody | No | String | Encrypted ciphertext.
|
| Parameter Name | Type | Description |
|---|---|---|
| AttackRiskLevel | String | Detection result for the input image/video to check the existence of face spoofing attack.
It is advisable to judge as interception when the return value is High, and pass for Mid and Low to better balance security and pass rate. |
| AttackRiskDetailList | Array of AttackRiskDetail | List of suspected attack traces detected. It is returned only when AttackRiskLevel is High or Mid.
|
| ExtraInfo | ExtraInfo | Return additional information (including detailed information of cache hit templates). |
| 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. |
POST / HTTP/1.1
Host: faceid.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DetectAIFakeFaces
<Common request parameters>
{
"FaceInputType": 1,
"FaceInput": "VBORw0KGgoAAAANSUhEUgAAAkYAAAI9CAYAAADfOLduAAABQ2lDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSCwoyGFhYGDIzSspCnJ3UoiIjFJgf87AziDBwMcgwqCQmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsgsz5I1BWZcn/xff7Y4dPvimWmY6lEAV0pqcTKQ/gPEyckFRSUMDIwJQLZyeUkBiN0CZIsUAR0FZM8AsdMh7DUgdhKEfQCsJiTIGci+AmQLJGckpgDZT4BsnSQk8XQkNtReEOD0CFBwNTI3LiTgVpJBSWpFCYh2zi+oLMpMzyhRcASGUKqCZ16yno6CkYGRMQMDKLwhqj/fAIcjoxgHQqzwKgODhTyQ8RQhlniBgWH3OgYG4Z8IMWUDBgYeoGn7/AsSixLhDmD8xlKcZmwEYXNvZ2Bgnfb//+dwBgZ2TQaGv9f///+9/f//v8sYGJhvMTAc+AYADqxgzYM88zoAAAA4ZVhJZk1NACoAAAAIAAGHaQAEAAAAAQAAABoAAAAAAAKgAgAEAAAAAQAAAkagAwAEAAAAAQAAAj0AAAAAi/M5dAAAQABJREFUeAHsvWd35EiSbYsIRlCkViW6pmq6Wry71vz/fzEf3n2fpufd"
}
{
"Response": {
"AttackRiskDetailList": [
{
"Type": "SuspectedWatermark"
}
],
"AttackRiskLevel": "High",
"RequestId": "2dd93e6f-5121-4bac-8c64-d6ad646663d2"
}
}
Example of a full-body encrypted request
POST / HTTP/1.1
Host: faceid.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DetectAIGCContent
<Common request parameters>
{
"Encryption": {
"Algorithm": "AES-256-CBC",
"EncryptList": [
"EncryptionBody"
],
"CiphertextBlob": "qwRTgn+52FAvnfrGL1oPBsXG4FLBd42YRw",
"Iv": "vqfsaEOpGJESA=="
},
"EncryptedBody": "v32onREKL6bk6WHOGFEjE2M6kvqybGCVTjlm"
}
{
"Response": {
"AttackRiskDetailList": [
{
"Type": "SuspectedWatermark"
}
],
"AttackRiskLevel": "High",
"RequestId": "2dd93e6f-5121-4bac-8c64-d6ad646663d2"
}
}
Image decoding failed
POST / HTTP/1.1
Host: faceid.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DetectAIFakeFaces
<Common request parameters>
{
"FaceInputType": 2,
"FaceInput": "AAAAHGZ0eXBtcDQyAAAAAWlzb21tcDQxbXA0MgAADXNtb292AAAAbG12aGQAAAAA2qNvttqjb7cAAB9AAACYFgABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAJ/XRyYWsAAABcdGtoZAAAAAHao2+22qNvtwAAAAEAAAAAAACYFgAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAADwAAAAtAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAmBYAAAAUAAEAAAAACXVtZGlhAAAAIG1kaGQAAAAA2qNvttqjb7cAAAJYAAALaFXEAAAAAAAxaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAENvcmUgTWVkaWEgVmlkZW8AAAAJHG1pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQ"
}
{
"Response": {
"Error": {
"Code": "FailedOperation.ImageDecodeFailed",
"Message": "Image decoding failed."
},
"RequestId": "0e77ad29-ad65-4901-9efc-b49a6e0a357b"
}
}
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 |
|---|---|
| FailedOperation.CoveredFace | The face in the picture is blocked, please upload a picture without any blockage |
| FailedOperation.DetectEngineSystemError | The service engine call failed, please try again |
| FailedOperation.ImageDecodeFailed | Image decoding failed. |
| FailedOperation.IncompleteFace | No complete face was detected. Please enter a complete face image. |
| FailedOperation.PoorImageQuality | The image quality is too poor, please check the image quality |
| FailedOperation.UnKnown | Unknown internal error. |
| FailedOperation.VideoDecodeFailed | Video decoding abnormality |
| FailedOperation.VideoDurationExceeded | The video duration is too long. The maximum video duration supported by the current interface is 20s. |
| InvalidParameter | Invalid parameter. |
| InvalidParameterValue | Incorrect parameter value. |
| RequestLimitExceeded | Number of requests exceeds the frequency limit. |
| UnauthorizedOperation.Arrears | The account is in arrears. |
| UnauthorizedOperation.ChargeStatusException | The billing status is abnormal. |
| UnauthorizedOperation.Nonactivated | The service has not been activated. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback