FACE_IDU_MIN is an API-based liveness detection service. Powered by the Qwen-VL large model, it analyzes a pre-captured face image for liveness attack risks to determine if the face belongs to a real person. The service also supports flexible verification options, including 1:1 verification against a stored face image and 1:N search within a face group to check for duplicates. Additionally, upon successful verification, it can automatically register the face to a specified face group.
API reference
Operation: FaceVerifyIntl
Request method: POST over HTTPS
Description: Call the FaceVerifyIntl operation to perform liveness verification.
QPS limit: This operation has a dedicated QPS limit. For more information, see QPS limits of ID Verification server-side APIs.
Endpoints:
NoteBenefits of internal network access: An internal network is a private communication network connecting Alibaba Cloud products within the same region. If your application server is deployed in the same region, use the internal endpoint to access the ID Verification service for enhanced security and stability.
Optimizing overseas access: Overseas network environments can be complex. Refer to Optimize server network latency to tune your integration and reduce network latency and request failures.
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 you debug and integrate the API, make sure you have read the Use OpenAPI documentation to understand how to call APIs and obtain SDKs on the OpenAPI platform.
You can run this operation in OpenAPI Explorer to debug it and generate SDK code samples.
Request parameters
Face image parameters
Provide the face image in one of the following three ways:
-
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 parameter details
Parameter | Type | Required | Description | Example |
ProductCode | String | Yes | The product solution identifier. Set the value to | FACE_IDU_MIN |
MerchantBizId | String | Yes | A unique business identifier for the merchant, used to identify and troubleshoot issues. The identifier is a 32-character string of letters and numbers. The server-side does not validate the uniqueness of this ID. The merchant must ensure that the ID is unique. | e0c34a77f5ac40a5aa5e6ed20c35**** |
MerchantUserId | String | Yes | A custom user identifier, or another recognizable user identifier, such as a mobile phone number or email address. We recommend that you desensitize or hash this field. | 123456789 |
SourceFacePicture | String | Yes (choose one of the three SourceFace parameters) | The source face image for liveness detection, encoded in Base64. | base64 |
SourceFacePictureUrl | String | A publicly accessible HTTP or HTTPS URL of the source face image. | https://***face1.jpeg | |
SourceFacePictureFile | String | The file stream of the source face image. | For integration details, see Advanced feature for file uploads. | |
FaceQualityCheck | String | No | [Face detection setting] Specifies whether to enable the face quality check, which is disabled by default. Valid values:
When enabled, the system automatically rejects low-quality face images, such as those that are blurry or occluded, and prevents them from being used in subsequent steps like comparison. We recommend enabling this option for scenarios that require high accuracy or to reduce invalid requests. If an image is rejected, the API returns a 401 error with the message UnqualifiedPhoto. | N |
FaceAttributeCheck | String | No | [Face detection setting] Specifies whether to return additional facial attribute information.
| N |
VerifyModel | String | Yes | [Product settings] The verification mode:
| 0 |
TargetFacePicture | String | Required if | [Product settings - 1:1 validation] The Base64-encoded string of the trusted target face image for 1:1 comparison. | base64 |
TargetFacePictureUrl | String | [Product settings - 1:1 validation] The URL of the face image. The URL must be a publicly accessible HTTP or HTTPS link. | https://***face2.jpeg | |
TargetFacePictureFile | String | [Product settings - 1:1 validation] The file stream of the face image. | For integration details, see Advanced feature for file uploads. | |
FaceGroupCodes | String | Required if | [Product settings - 1:N retrieval] The codes of face groups for 1:N retrieval. You can obtain the code when you create a face group in the ID Verification console. You can specify up to 10 face groups at a time. Use commas (,) to separate multiple face group codes. | sg*****xta,s*****uk3j |
ReturnFaces | String | Required if | [Product settings - 1:N retrieval] The number of matching faces to return when multiple faces exceed the match threshold. Default: 1. Maximum: 5. | 1 |
AutoRegistration | String | Required if | [Product settings - 1:N retrieval] Specifies whether to automatically register the face to a face group after successful verification:
| 0 |
FaceRegisterGroupCode | String | Required if | [Product settings - 1:N retrieval] The code of the target face group for auto-registration. | sg*****xta |
UpdateFaceIfUserExists | String | Required if | [Product Solution Configuration - 1:N Search] If the
| N |
Three verification modes
Verification mode | VerifyModel value | Core logic | Use case | Key parameters | Auto-registration condition |
Validation mode (default) |
| liveness detection + 1:1 validation | Logins, account recovery, and sensitive action confirmations. |
| Not applicable |
Retrieve mode |
| liveness detection + 1:N retrieval | Preventing duplicate registrations for new users and enforcing one account per person. |
| Liveness detection passes, and 1:N retrieval finds no match. |
Comprehensive mode |
| liveness detection + 1:1 validation + 1:N retrieval | New user registration that requires both identity confirmation and duplicate checking. | Requires all key parameters for both validation mode (value | Liveness detection passes, 1:1 validation passes, and 1:N retrieval finds no match. |
Response data
Parameter | Type | Description | Example | |
HTTP status code | Integer | The HTTP status code. | 200 | |
HTTP Body | RequestId | String | The request ID. | 130A2C10-B9EE-4D84-88E3-5384FF0**** |
Code | String | The return code. For more information, see Server-side HTTP status codes. | Success | |
Message | String | A description of the return code. | success | |
Result.TransactionId | String | The unique identifier of the verification request. | 4ab0b***cbde97 | |
Result.SubCode | String | The sub-code for the verification result. For more information, see Result.SubCode reference. | 200 | |
Result.FacePassed | String | The final verification result. Valid values:
| Y | |
Result.FaceAttack | String | Indicates whether a liveness attack was detected. Valid values:
| 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.ExtFaceInfo | Object | Information about the liveness detection result. For the JSON format, see the example on the right. For more information, see Result.ExtFaceInfo. | | |
Result.FaceComparisonScore | Double | The face comparison result is returned when | 98 | |
Result.DuplicateFace | String | Returns the duplicate face search result when The returned fields are defined as follows:
| | |
Result.FaceRegistrationResult | Integer | Face registration result (returned when
| 1 | |
Result.FaceRegistrationId | String | The ID of the registered face, which is returned when | 9e792******a592a | |
Result.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 |
Result.SubCode reference
Sub-code | Billable | Description and suggestion |
200 | Yes | Verification passed. |
204 | Yes | [1:1 verification result] This may be because the user is not the same person or the face image quality is poor. |
205 | Yes | [Liveness result] Liveness risk detected, indicating a potential liveness attack. |
233 | Yes | 1:N Search Result: Similar faces detected. Use the information in |