FACE_IDU_MIN is an API-based real-person face detection service. The service accepts pre-acquired face images as input and uses the Qwen-VL large model to deeply analyze forgery risks and accurately determine whether the subject is a real person. The service supports multiple comparison and verification solutions: 1:1 identity verification against a stored face image, and 1:N search in a face group to determine whether a person exists. After successful verification, the service can also automatically register the face to a specified face group
API description
API operation: FaceVerifyIntl
Request method: POST over HTTPS
Description: Call the FaceVerifyIntl API to perform liveness verification.
QPS limit: Each API has a dedicated QPS limit. For more information, see QPS limits of ID Verification server-side APIs.
Endpoints:
NoteAn internal network refers to the internal communication network between Alibaba Cloud services in the same region. If your business server is deployed in the corresponding Alibaba Cloud region, you can use the internal endpoint to access the ID Verification service for more secure and stable network communication.
Singapore
Public endpoint:
cloudauth-intl.ap-southeast-1.aliyuncs.comInternal endpoint:
cloudauth-intl-vpc.ap-southeast-1.aliyuncs.com
Indonesia (Jakarta)
Public endpoint:
cloudauth-intl.ap-southeast-5.aliyuncs.comInternal endpoint:
cloudauth-intl-vpc.ap-southeast-5.aliyuncs.com
China (Hong Kong)
Public endpoint:
cloudauth-intl.cn-hongkong.aliyuncs.comInternal endpoint:
cloudauth-intl-vpc.cn-hongkong.aliyuncs.com
Malaysia (Kuala Lumpur)
Public endpoint:
cloudauth-intl.ap-southeast-3.aliyuncs.comInternal endpoint:
cloudauth-intl-vpc.ap-southeast-3.aliyuncs.com
Online debugging and integration
Before debugging and integrating, make sure that you have thoroughly read the Use OpenAPI documentation to fully understand how to call the API on the OpenAPI platform and how to obtain SDKs and code samples.
You can directly run this API in OpenAPI Explorer for debugging, and generate SDK code samples for this API.
Request parameters
Face image parameters
Three methods are available to provide a face image. Choose any one of them.
Base64 mode: SourceFacePicture/TargetFacePicture
URL mode: SourceFacePictureUrl/TargetFacePictureUrl
File stream mode: SourceFacePictureFile/TargetFacePictureFile
Image format: JPG, JPEG, or PNG.
Image size: Recommended 50–100 KB, maximum 1 MB.
Image resolution: Maximum
1920*1080(height × width), minimum640*480(height × width). Scale the shorter side to 720 px with compression ratio > 0.9. Height must exceed width; landscape orientation may reduce accuracy.NoteBase64 encoding inflates file size. Keep the original image under 0.6 MB to stay within the 1 MB transfer limit.
Image quality recommendations:
Face must be complete, clear, unobstructed, and front-facing. Use a front-facing camera.
Face must occupy more than 60% of the image area. Smaller faces reduce accuracy.
Multiple faces: the algorithm processes the largest one. Avoid multi-face images.
Request parameters
Name | Type | Required | Description | Example |
ProductCode | String | Yes | The product code. Set the value to FACE_IDU_MIN. | FACE_IDU_MIN |
MerchantBizId | String | Yes | A custom business-unique identifier used for subsequent issue locating and troubleshooting. The value supports a combination of letters and digits with a length of 32 characters. Make sure that the value is unique. | e0c34a77f5ac40a5aa5e6ed20c35**** |
MerchantUserId | String | Yes | A custom user ID, or another identifier that can identify a specific user, such as a mobile number or email address. We strongly recommend that you desensitize the value in advance, for example, by hashing it. | 123456789 |
VerifyModel | String | Yes | The verification mode:
| 0 |
FaceGroupCodes | String | No | Obtain the corresponding code when you create a face group in the ID Verification console. You can query up to 10 face groups at the same time. Separate multiple face group codes with commas (,). | 1232344,23444 |
SourceFacePicture | String | No | The Base64-encoded face image. | base64 |
SourceFacePictureUrl | String | No | The URL of the face image, which must be publicly accessible over HTTP or HTTPS. | https://***face1.jpeg |
SourceFacePictureFile | String | No | The face image file stream. | Face image file stream 1 |
TargetFacePicture | String | No | The Base64-encoded reference (target) face image. | base64 |
TargetFacePictureUrl | String | No | The URL of the reference (target) face image, which must be publicly accessible over HTTP or HTTPS. | https://***face2.jpeg |
TargetFacePictureFile | String | No | The reference (target) face image file stream. | Face image file stream 2 |
AutoRegistration | String | No | Specifies whether to automatically register the face to a specified face group when the face is not found during search.
| 0 |
FaceRegisterGroupCode | String | No | The face group for registration. | 0e0c34a77f |
ReturnFaces | String | No | The number of faces to return when multiple faces exist above the matching threshold.
| 1 |
FaceQualityCheck | String | No | Enables face quality inspection. Disabled by default. Valid values:
When enabled, the system blocks low-quality photos (blurry, occluded) from comparison. Recommended when higher accuracy is required or to reduce invalid requests. Returns 401 (UnqualifiedPhoto) for blocked images. | N |
FaceAttributeCheck | String | No | Whether to return additional face attribute fields.
| N |
Response data
Name | Type | Description | Example | |
HTTP Status Code | Integer | The HTTP status code. | 200 | |
HTTP Body | RequestId | String | The ID of the request. | 130A2C10-B9EE-4D84-88E3-5384FF0**** |
Code | String | Return code: For more information, see Server-side HTTP status codes. | Success | |
Message | String | This section provides detailed descriptions of the return codes. | success | |
Result.FacePassed | String | The final authentication result. Valid values:
| Y | |
Result.FaceComparisonScore | Double | Returned when | 98 | |
Result.DuplicateFace | String | Returned when a duplicate face is found during search. The face ID, user ID, and comparison score of the corresponding face in the face group are returned. | | |
Result.FaceRegistrationResult | Integer | The face registration result.
| 1 | |
Result.FaceRegistrationId | String | Returned when automatic registration is enabled and the face is successfully registered. The corresponding FACEID is returned. | 9e792******a592a | |
Result.FaceAttack | String | Indicates whether the captured face involves a liveness attack. Y indicates an attack, and N indicates no attack. Returned when silent liveness detection is enabled. | N | |
Result.FaceAttributeInfo | String | Detects the facial attributes of the main face in an input image. The main face is the one that is largest, clearest, and closest to the camera. The detection results are returned as a string. You can use this string to make decisions about the content. The returned fields are defined as follows:
| | |
Result.SubCode | String | A description of the authentication result. For more information, see the SubCode section. | 200 | |
Result.TransactionId | String | The unique identifier of the authentication request. | 4ab0b***cbde97 | |
Result.ExtFaceInfo | Object | The liveness detection result information. For the JSON format, see the example on the right. For more information, see the ExtFaceInfo section. | | |
SubCode
Error code | Billable | Description |
200 | Yes | Authentication passed. |
204 | Yes | Face mismatch. The faces may not belong to the same person, or the liveness photo quality is low. |
205 | Yes | Liveness risk detected. |
233 | Yes | Similar face detected. |
ExtFaceInfo
Name | Type | Description | Example |
FaceQualityScore | Double | The liveness face quality score. Valid values: 0 to 100. A higher value indicates better quality. | 88.62 |
OcclusionScore | Double | A quality assessment sub-dimension: the occlusion score. Valid values: 0 to 100. A higher value indicates better quality. | 99.99 |
KaOcclusionScore | Double | A quality assessment sub-dimension: the key area occlusion score. Valid values: 0 to 100. A higher value indicates better quality. | 100 |
IlluminationScore | Double | A quality assessment sub-dimension: the illumination score. Valid values: 0 to 100. A higher value indicates better quality. | 97.43 |
SharpnessScore | Double | A quality assessment sub-dimension: the image sharpness score. Valid values: 0 to 100. A higher value indicates better quality. | 60.78 |