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.
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
IDN01001andGLB03002).Malaysia (Kuala Lumpur) region: Supports only Malaysian ID cards and global passports (document type codes
MYS01001andGLB03002).
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:
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.
Asia Pacific SE 1 (Singapore)
Public endpoint:
cloudauth-intl.ap-southeast-1.aliyuncs.comInternal endpoint:
cloudauth-intl-vpc.ap-southeast-1.aliyuncs.com
China (Hong Kong)
Public endpoint:
cloudauth-intl.cn-hongkong.aliyuncs.comInternal endpoint:
cloudauth-intl-vpc.cn-hongkong.aliyuncs.com
Asia Pacific SE 5 (Jakarta)
Public endpoint:
cloudauth-intl.ap-southeast-5.aliyuncs.comInternal endpoint:
cloudauth-intl-vpc.ap-southeast-5.aliyuncs.com
Asia Pacific SE 3 (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 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.
NoteImage 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 |
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.
| GLB03001 |
DocPage | String | No | The page to be recognized.
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:
| F |
IdThreshold | String | No | OCR card quality check:
| 3 |
OcrValueStandard | String | No | Specifies whether to return additional OCR fields in a standardized format:
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 |
| 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. |
| 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. |
| 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 |
| 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 | 200 | ||
Result.ExtIdInfo | String | The results of the document OCR and anti-spoofing detection. For details, see ExtIdInfo. |
| |
ExtIdInfo
Parameter | Type | Description | Example |
ocrDocType | String | The document type code or document code. Note
| CHN01 |
ocrIdInfo | String | The OCR field data extracted from the ID document. Note
|
|
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.
| |
ocrStandardData | String | The standardized OCR field data from the ID document. Note This field is returned only if the document type is supported and | |
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. |