All Products
Search
Document Center

ID Verification:FACE_IDU_MIN

Last Updated:Aug 24, 2026

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:

    Note
    • Benefits 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.com

    • Internal endpoint: cloudauth-intl-vpc.ap-southeast-1.aliyuncs.com

    Indonesia (Jakarta)

    • Public endpoint: cloudauth-intl.ap-southeast-5.aliyuncs.com

    • Internal endpoint: cloudauth-intl-vpc.ap-southeast-5.aliyuncs.com

    China (Hong Kong)

    • Public endpoint: cloudauth-intl.cn-hongkong.aliyuncs.com

    • Internal endpoint: cloudauth-intl-vpc.cn-hongkong.aliyuncs.com

    Malaysia (Kuala Lumpur)

    • Public endpoint: cloudauth-intl.ap-southeast-3.aliyuncs.com

    • Internal endpoint: cloudauth-intl-vpc.ap-southeast-3.aliyuncs.com

Online debugging and integration

Note

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), minimum 640*480 (height × width). Scale the shorter side to 720 px with compression ratio > 0.9. Height must exceed width; landscape orientation may reduce accuracy.

    Note

    Base64 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.

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:

  • N: Disabled (default).

  • Y: Enabled.

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: Disabled (default).

  • Y: Enabled. If enabled, the attributes are returned as a string in the faceAttributeInfo field within the ExtFaceInfo object.

N

VerifyModel

String

Yes

[Product settings] The verification mode:

  • 1 validation mode: 1:1 verification (default)

  • 0 retrieve mode: 1-to-N retrieval

  • 2Comprehensive mode: 1:1 verification + 1:N retrieval

0

TargetFacePicture

String

Required if VerifyModel is 1 or 2.

[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 VerifyModel is 0 or 2.

[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 VerifyModel is 0 or 2.

[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 VerifyModel is 0 or 2.

[Product settings - 1:N retrieval] Specifies whether to automatically register the face to a face group after successful verification:

  • 0: Enable auto-registration.

  • 1: Disable auto-registration (default).

0

FaceRegisterGroupCode

String

Required if VerifyModel is 0 or 2 and AutoRegistration is 0.

[Product settings - 1:N retrieval] The code of the target face group for auto-registration.

sg*****xta

UpdateFaceIfUserExists

String

Required if VerifyModel is 0 or 2.

[Product Solution Configuration - 1:N Search] If the MerchantUserId already exists during auto-registration, overwrite the existing face with the new one:

  • Y: Overwrite.

  • N: Do not overwrite (default). The service returns a "UserId already exists" error.

N

Three verification modes

Verification mode

VerifyModel value

Core logic

Use case

Key parameters

Auto-registration condition

Validation mode (default)

1

liveness detection + 1:1 validation

Logins, account recovery, and sensitive action confirmations.

TargetFacePicture, TargetFacePictureUrl, or TargetFacePictureFile (Choose one of the three to specify the target face)

Not applicable

Retrieve mode

0

liveness detection + 1:N retrieval

Preventing duplicate registrations for new users and enforcing one account per person.

FaceGroupCodes (Specifies the face groups to search).
ReturnFaces (Optional. Specifies the number of faces to return that exceed the matching threshold.)

Liveness detection passes, and 1:N retrieval finds no match.

Comprehensive mode

2

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 1) and retrieve mode (value 0).

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: Passed

  • N: Failed

Y

Result.FaceAttack

String

Indicates whether a liveness attack was detected. Valid values:

  • Y: Yes

  • N: No

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:

  • gender: The gender of the main entity. A value of 1 indicates male, and 0 indicates female.

  • glasses: Indicates whether the main entity is wearing glasses. A value of 1 indicates that glasses are detected, and 0 indicates that they are not.

  • hat: Indicates whether the main entity is wearing a hat. This includes headscarves or veils. A value of 1 indicates that a hat is detected, and 0 indicates that it is not.

  • mask: Indicates whether the main entity is wearing a mask. A value of 1 indicates that a mask is detected, and 0 indicates that it is not.

  • tattoo: Indicates whether the main entity has a visible tattoo. A value of 1 indicates that a tattoo is detected, and 0 indicates that it is not.

  • smoking: Indicates whether the main entity is smoking. A value of 1 indicates that smoking is detected, and 0 indicates that it is not.

  • others: Indicates whether people other than the main entity are present. A value of 1 indicates that other people are detected, and 0 indicates that they are not.

  • env: The environment of the main entity, such as an office, factory, hospital, or vehicle. The system currently supports returning office, hospital, factory, vehicle, or other.

  • expression: Indicates whether the main entity has an exaggerated expression. An exaggerated expression is a strong facial expression that is distinct from a natural or calm state. A value of 1 indicates that an exaggerated expression is detected, and 0 indicates that it is not.

  • age: The age of the main entity in years.

{
    "gender": 1,
    "glasses": 0,
    "hat": 1,
    "mask": 1,
    "tattoo": 0,
    "smoking": 0,
    "others": 1,
    "env": "office",
    "expression": 1,
    "age": 16
}

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.

{
  "FaceQualityScore": 66.3,
  "OcclusionScore": 100,
  "SharpnessScore": 70.3,
  "KaOcclusionScore": 80,
  "IlluminationScore": 90.79
}

Result.FaceComparisonScore

Double

The face comparison result is returned when VerifyModel=1/2. The comparison score ranges from 0 to 100. The default system threshold is 90. You can also customize the decision based on your business requirements.

98

Result.DuplicateFace

String

Returns the duplicate face search result when VerifyModel is 0 or 2 and a similar face is found.

The returned fields are defined as follows:

  • faceGroupCode: The code of the face group that contains the similar face.

  • faceId: The ID of the similar face.

  • merchantUserId: The unique user ID for a similar face.

  • score: The similarity score of the face.

[
  {
    "faceGroupCode": "sg7****uzt",
    "faceId": "f5a921*******9e792ec84c8f0ca592a",
    "merchantUserId": "face0005",
    "score": 93.26
  }
]

Result.FaceRegistrationResult

Integer

Face registration result (returned when VerifyModel=0/2):

  • 0: Registration failed due to an issue with the face image.

  • 1: Registration successful.

  • 2: Registration failed because the auto-registration conditions were not met.

  • 3: Registration failed because the user already exists.

  • 4: Registration successful, and the face image is updated successfully (This occurs when an entry meets the conditions for automatic registration, but has a duplicate MerchantUserId and UpdateFaceIfUserExists is set to Y).

1

Result.FaceRegistrationId

String

The ID of the registered face, which is returned when VerifyModel=0/2, AutoRegistration=0, and the registration is successful.

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 Result.ExtFaceInfo.duplicateFace to handle the risks of duplicate registration or identity spoofing.