All Products
Search
Document Center

ID Verification:ID_OCR_MAX

Last Updated:Sep 16, 2026

ID_OCR_MAX is an ID document recognition solution from ID Verification. Powered by the Qwen-VL model, it detects and recognizes various ID document types from around the world.

Important

Supported document types vary by region due to regional model limitations.

  • Singapore and China (Hong Kong) regions: Support the document types listed in the Document Types table.

  • Indonesia (Jakarta) region: Supports only Indonesian ID cards and global passports (document type codes IDN01001 and GLB03002).

  • Malaysia (Kuala Lumpur) region: Supports only Malaysian ID cards and global passports (document type codes MYS01001 and GLB03002).

Service endpoints

  • API operation: DocOcrMaxV2

  • Description: Recognizes the document type and extracts information from a document image using the Qwen-VL model, returning the relevant fields.

  • Request method: POST

  • Transport protocol: HTTPS

  • QPS limit: Each API has its own QPS limit. For more information, see QPS limits of ID Verification server-side APIs.

  • Service endpoint:

    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.

    Asia Pacific SE 1 (Singapore)

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

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

    China (Hong Kong)

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

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

    Asia Pacific SE 5 (Jakarta)

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

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

    Asia Pacific SE 3 (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 debugging and integration, read the Use OpenAPI document to learn how to call APIs on the OpenAPI platform and obtain the SDK.

You can debug this operation and generate SDK sample code in OpenAPI Explorer.

Image requirements

To ensure stable model performance, use images that meet the following requirements:

  • Image format: JPG, JPEG, or PNG.

  • Image size: The recommended size is 50 KB to 100 KB. The maximum size is 10 MB.

    Note

  • Image resolution: Height and width must be between 201 and 8,191 pixels. A resolution of 480×640 (height × width) is recommended.

  • Image quality recommendations:

    • All four corners of the card must be visible. Do not cover any part of the card, as this can impair detection.

    • The card image must be clear, unobstructed, free of glare, and correctly oriented (not tilted or upside down).

    • The card must occupy more than 60% of the total image area. If the card area is too small, it can impair recognition accuracy.

    • Use a photo of an actual card.

Request parameters

Parameter

Type

Required

Description

Example

ProductCode

String

Yes

The product solution to use. Set the value to ID_OCR_MAX.

ID_OCR_MAX

SceneCode

String

No

A custom authentication scenario ID. You can use this ID to query related records in the console.

The ID can contain a combination of letters, digits, and underscores, up to 10 characters in length.

1234567890

MerchantBizId

String

Yes

A custom unique business ID. You can use this ID to track and troubleshoot issues.

The ID must be unique and can contain a combination of up to 32 letters and digits.

e0c34a77f5ac40a5aa5e6ed20c35****

MerchantUserId

String

No

A custom user ID or another identifier for a specific user, such as a mobile phone number or an email address.

We strongly recommend that you desensitize this value before passing it, for example, by hashing it.

123456789

IdOcrPictureBase64

String

No. One of the three image upload methods is required.

The base64-encoded image of the ID document.

base64

IdOcrPictureUrl

String

The URL of the ID document image. The URL must be a publicly accessible HTTP or HTTPS link.

https://***.jpg

IdOcrPictureFile

InputStream

The file stream of the ID document image.

For specific integration methods, see File uploads with the Advance interface.

OcrModel

String

No

The OCR recognition mode:

Note

Modes 1 and 2 do not support document anti-spoofing detection. For more information, see Recognition mode differences.

  • 0: Specified document recognition mode (default)

  • 1: Automatic document classification mode

  • 2: Automatic document classification and general recognition mode

  • 3: Automatic document classification by country/region code and specified document recognition mode

0

DocType

String

No

[OCR Configuration] The document code or the country/region code. If you pass in a country/region code, you can specify up to three codes (for example, CHN, HKG, and GLB) to define the scope for automatic classification. The system automatically retrieves the supported document types within this scope and returns a specific document code after successful recognition.

For supported country/region document codes, see the Document Types table. For the OCR fields returned for each document type, see the Document OCR Fields table.

Important

Supported document types vary by region due to regional model limitations.

  • Singapore and China (Hong Kong) regions: Support the document types listed in the Document Types table.

  • Indonesia (Jakarta) region: Supports only Indonesian ID cards and global passports (document codes IDN01001 and GLB03002).

  • Malaysia (Kuala Lumpur) region: Supports only Malaysian ID cards and global passports (document codes MYS01001 and GLB03002).

  • If OcrModel = 0, the DocType parameter is required. You must specify the document type.

  • If OcrModel = 1 or 2, the DocType parameter is ignored.

  • If OcrModel = 3, the DocType parameter is required. You must specify the country or region code for classification.

GLB03001

DocPage

String

No

The page to be recognized.

  • 01 (default): The portrait side of the document

  • 02: The back side of the document

Important

If the detected page does not match the specified page, the service returns Subcode 213.

01

IdSpoof

String

No

Specifies whether to enable document anti-spoofing detection:

  • T (default): Enable

  • F: Disable

F

IdThreshold

String

No

OCR card quality check:

  • 1: Enable strict mode

  • 2: Enable loose mode (default)

  • 3: Disable

3

OcrValueStandard

String

No

Specifies whether to return additional OCR fields in a standardized format:

  • 0: No (default)

  • 1: Yes

Note

For details about supported document types and standardized fields, see Field standardization.

0

Recognition mode differences

OCR recognition mode

Input differences

Output differences

Recommended use cases

0: Specified document recognition mode

  • You must specify the document type and page.

    For supported document types and pages, see Document Types.

  • You can optionally enable card quality inspection and document anti-spoofing detection.

Outputs detailed document fields. For details, see Document OCR Fields.

Online user onboarding that requires validating the document type and extracting detailed fields.

1: Automatic document classification mode

Important

This recognition mode is supported only in the Singapore region.

  • You do not need to specify the document type.

  • You can enable card quality inspection.

  • Document anti-spoofing detection is not supported.

Outputs only the detected document type code (for example, CHN01). For more information, see Global ID document codes.

Offline business analysis scenarios for clustering and cleaning up historical ID document images.

2: Automatic document classification and general recognition mode

Important

This recognition mode is supported only in the Singapore region.

  • You do not need to specify the document type.

  • You can enable card quality inspection.

  • Document anti-spoofing detection is not supported.

Outputs the document type code (for example, CHN01) and key common fields from the document. For details, see the Table of general recognition fields.

Note

Offline assisted manual review scenarios where recognizing the document type and key fields can improve review efficiency.

3: Automatic document classification by country/region code and specified document recognition mode

  • You must specify the country/region code.

  • You can optionally enable card quality inspection and document anti-spoofing detection.

Outputs the document code (for example, CHN01001) and detailed document fields. For details, see Document OCR Fields.

Online user onboarding that requires validating multiple document types from a specific country or region and extracting detailed fields.

Response parameters

Parameter

Type

Description

Example

HTTP status code

Integer

The HTTP status code.

200

HTTP Body

RequestId

String

The request ID.

130A2C10-B9EE-4D84-88E3-5384F********

Result.TransactionId

String

The unique transaction ID for the entire authentication process.

hksb7ba1b28130d24e015d694********

Code

String

The result code. For more information, see Server-side HTTP status codes.

Success

Message

String

A detailed description of the Code parameter.

success

Result.Passed

String

Indicates whether the recognition passed.

Y

Result.SubCode

String

Result.SubCode error codes.

200

Result.ExtIdInfo

String

The results of the document OCR and anti-spoofing detection. For details, see ExtIdInfo.

  • OcrModel = 0:

    {
      "ocrIdInfo": {
      "expiryDate": "",
      "originOfIssue": "MPS Exit & Entry Administration",
      "englishName": "LI SI",
      "sex": "M",
      "name": "Li Si",
      "idNumber": "H11111112",
      "issueDate": "2013-01-02",
      "birthDate": "1990-02-21"
    },
      "spoofInfo":{
         "spoofResult": "Y",
         "spoofType": ["SCREEN_REMARK"]
      },
    }
  • OcrModel = 1:

    {
      "ocrDocType":"CHN01"
    }
  • OcrModel = 2:

    {
      "ocrDocType": "CHN01",
      "ocrIdInfo": {
         "given_name_s": "Jing",
         "surname_s": "Lu",
         "date_of_birth_s": "1976-05-23",
         "card_number_s": "642123197605230048",
         "sex_s": "F"
       }
    }
  • OcrModel = 3:

    {
      "ocrDocType": "CHN01001",
      "ocrIdInfo": {
      "expiryDate": "",
      "originOfIssue": "MPS Exit & Entry Administration",
      "englishName": "LI SI",
      "sex": "M",
      "name": "Li Si",
      "idNumber": "H11111112",
      "issueDate": "2013-01-02",
      "birthDate": "1990-02-21"
    },
      "spoofInfo":{
         "spoofResult": "Y",
         "spoofType": ["SCREEN_REMARK"]
      },
    }

ExtIdInfo

Parameter

Type

Description

Example

ocrDocType

String

The document type code or document code.

Note
  • If OcrModel = 1 or 2, the API returns a 5-digit document type code, such as CHN01.

  • If OcrModel = 3, the API returns a more specific document code, such as CHN01001.

CHN01

ocrIdInfo

String

The OCR field data extracted from the ID document.

Note
  • This field is empty if the OCR process fails.

  • This field is empty if OcrModel = 1.

  • If OcrModel = 2, this field contains the common fields of the automatically classified document.

  • If OcrModel = 0 or 3, this field contains all fields from the document page.

  • OcrModel = 2

     {
         "given_name_s": "Jing",
         "surname_s": "Lu",
         "date_of_birth_s": "1976-05-23",
         "card_number_s": "642123197605230048",
         "sex_s": "F"
       }
  • OcrModel = 0 or 3

    {
      "expiryDate": "",
      "originOfIssue": "MPS Exit & Entry Administration",
      "englishName": "LI SI",
      "sex": "M",
      "name": "Li Si",
      "idNumber": "H11111112",
      "issueDate": "2013-01-02",
      "birthDate": "1990-02-21"
    }

spoofInfo

String

The result of document anti-spoofing detection, including the risk decision and risk types:

Note

Anti-spoofing detection is enabled only when IdSpoof = T.

Otherwise, spoofResult returns N, and spoofType is empty.

  • spoofResult:

    • Y: Risk detected

    • N: Normal

  • spoofType:

    • SCREEN_REMARK: screen recapture

    • PHOTO_COPY: photocopy

    • TAMPER: tampering

    • SHORTCUT: screenshot

{
 "spoofResult": "Y",
 "spoofType": ["SCREEN_REMARK"]
}

ocrStandardData

String

The standardized OCR field data from the ID document.

Note

This field is returned only if the document type is supported and OcrValueStandard is set to 1.

{
    "given_name_s": "HYUNEUI",
    "surname_s": "MUN",
    "date_of_expiry_s": "2028-02-08",
    "date_of_birth_s": "1988-10-26",
    "sex_s": "M"
}

Result.SubCode error codes

Error code

Billed

Description and suggestions

200

Yes

Authentication passed.

211

Yes

[Document solution] The image quality or resolution does not meet the requirements, or the image is incomplete. Ensure the document image is clear, properly exposed, complete, unobstructed, and correctly oriented.

212

Yes

[Document solution] Document anti-spoofing detection has detected a risk. Possible causes include screen recapture, tampering, or photocopying.

213

Yes

[Document solution] The specified document type was not detected (in specified document recognition mode), or the document type could not be identified (in automatic classification mode).

Provide a clear, complete, and correctly oriented document image.