All Products
Search
Document Center

ID Verification:Synchronous call

Last Updated:Sep 21, 2026

This topic describes the API for the Credential Recognition service. You can call this synchronous API to pass a credential image or PDF file, extract key information by using AI, and perform forgery detection. The API returns a result immediately.

API reference

  • API name: CredentialRecognitionIntlV2

  • Description: Extracts key information from a credential image or PDF file by using AI and supports forgery detection.

  • Request method: POST

  • Protocol: HTTPS

  • QPS limit: Each API has its own 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

Note
  1. The forgery detection feature for Credential Recognition is an AI-powered prediction product. It achieves a 90% accuracy rate on internal test datasets. The actual accuracy may vary across sample scenarios.

  2. Detecting tampering in digitally synthesized images is more difficult. The detection performance is better for images captured with a native camera than for those that are digitally synthesized.

  3. We recommend that you do not use forgery detection as the sole method for verifying credential authenticity. Use it as a supplementary check or as a tool to improve manual review efficiency.

  4. Forgery detection is widely used in electronic material review scenarios, such as financial payment acquiring and e-commerce merchant onboarding, to improve manual review efficiency. If you have requirements for a wider range of scenarios, contact your account manager.

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 use OpenAPI Explorer to directly call this API for debugging, and generate SDK code examples.

Request parameters

The file corresponding to the CredentialOcrPictureBase64, CredentialOcrPictureUrl, or CredentialOcrPictureFile parameter must meet the following requirements:

  • Submission method: Choose one of the three upload methods.

  • File format: When FileInputType=IMAGE (default), the supported formats are PNG, JPG, JPEG, BMP, and WebP. When FileInputType=PDF, the supported format is PDF.

  • File dimensions: Both width and height must be greater than 15 pixels and less than 8,192 pixels, and the aspect ratio must be less than 50.

  • File size: Cannot exceed 10 MB.

Note
  • For optimal recognition results, we recommend that both the width and height of the image are greater than 500 pixels.

  • Large files can increase the API response time. We recommend using files smaller than 3 MB.

Parameter

Type

Required

Description

Example

ProductCode

String

Yes

The value must be CREDENTIAL_RECOGNITION.

CREDENTIAL_RECOGNITION

CredentialOcrPictureBase64

String

No. Specify only one of the three upload parameters.

The Base64-encoded image or PDF file. If you use this method, verify the file size and do not pass an excessively large file.

base64

CredentialOcrPictureUrl

String

A publicly accessible HTTP or HTTPS URL of the image or PDF file.

https://***.jpg

CredentialOcrPictureFile

InputStream

The file stream of the credential. For integration details, see Special Scenarios: File Uploading Through the Advance API.

FileInputType

String

No

The type of the input file.

  • IMAGE: Image (default).

  • PDF: PDF file. The system automatically extracts the first page of the PDF for recognition.

IMAGE

DocType

String

Yes

The credential type:

  • 01: Transaction receipt, including various electronic bills for water, electricity, gas, and credit cards.

  • 03: Transaction record for a transfer.

  • 04: Proof of address.

01

OcrArea

String

Yes

The extraction type:

  • 0101: Address and name fields from an electronic bill, extracted through intelligent analysis.

  • 0301: Amount information from a transaction record for a transfer.

  • 0401: Information extracted from a proof of address.

0101

FraudCheck

String

Yes

Enables or disables tampering detection.

  • true: Enable

  • false: Disable

true

CheckRuleConfig

String

No

A JSON string that specifies the field validation rules.

{
  "address_rule": "Includes Address Hangzhou***",
  "name_rule": "Includes Name Zhang*",
  "date_of_issue_rule": "Within 2026.05.20"
}

OcrValueStandard

String

No

Specifies whether to enable standardization of OCR results.

  • 0: Disable

  • 1: Enable

0

OcrTranslation

String

No

Specifies whether to enable translation.

  • 0: Disable

  • 1: Enable

0

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-5384FF039****

ResultObject.TransactionId

String

A unique identifier for the verification process.

hksb7ba1b28130d24e015d694361b****

Code

String

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

Important
  • This parameter indicates whether the API call was successful.

  • The business verification result is returned in the ResultObject fields.

Success

Message

String

The response message.

success

ResultObject.Success

String

The extraction result:

  • S: Success

  • F: Failure

S

ResultObject.SubCode

String

The description of the verification result. For more information, see ResultObject.SubCode error codes.

200

ResultObject.ExtIdInfo

String

For the JSON format, see the example on the right. For more information, see ResultObject.ExtIdInfo.

  • If the OcrArea request parameter is set to 0101:

    {
      // When tampering detection is enabled (FraudCheck = true), spoofInfo is returned.
      "spoofInfo":
      {
        "spoofResult": "Y",
        "spoofType": ["PS", "SCREEN_PHOTO", "ORIGINAL_PHOTO"]
      },
      "recInfo":
      {
        "address": "Yingfeng Subdistrict, Xiaoshan District, Hangzhou City, Zhejiang Province***",
        "name": "Zhang San"
      }
    }
  • If the OcrArea request parameter is set to 0301:

    {
      // When tampering detection is enabled (FraudCheck = true), spoofInfo is returned.
      "spoofInfo":
      {
        "spoofResult": "Y",
        "spoofType": ["PS", "SCREEN_PHOTO", "ORIGINAL_PHOTO"]
      },
      "recInfo":
      {
        "money": "$41.41"
      }
    }
  • If the OcrArea request parameter is set to 0401:

    {
      "translateInfo": {
        "address_t": "1/176-C China",
        "name_t": "SSS SSS SSS"
      },
      "standardInfo": {
        "date_of_issue_s": "2010-06-05"
      },
      "spoofInfo": {
        "spoofResult": "Y",
        "spoofType": ["PS", "SCREEN_PHOTO", "ORIGINAL_PHOTO"]
      },
      "checkInfo": {
        "address_rule": "Y",
        "date_of_issue_rule": "Y",
        "name_rule": "Y"
      },
      "recInfo": {
        "address": "1/176-C China",
        "date_of_issue": "06/05/2010",
        "name": "SSS SSS SSS"
      }
    }

ResultObject.SubCode error codes

Error code

Billing

Description

200

Yes

Extraction successful.

204

Yes

Key information failed the validation rules specified in CheckRuleConfig.

211

Yes

Poor file quality or resolution. Ensure the file is clear, well-exposed, complete, unobstructed, and not significantly skewed.

212

Yes

The anti-spoofing check detected a risk. This may be caused by indicators such as screen photo, tampering, or photocopying.

213

Yes

Incorrect file type. Ensure the file type matches the DocType parameter.

ResultObject.ExtIdInfo

Parameter

Type

Description

Example

recInfo

String

The extracted key information.

Note

This field is empty if the extraction fails.

  • If the OcrArea request parameter is set to 0101:

    {
      "address": "Yingfeng Subdistrict, Xiaoshan District, Hangzhou City, Zhejiang Province***",
      "name": "Zhang San"
    }
  • If the OcrArea request parameter is set to 0301:

    {
      "money": "$41.41"
    }

spoofInfo

String

The result of the anti-spoofing check, including the risk assessment and risk type:

  • spoofResult:

    • Y: Risk detected

    • N: Normal

  • spoofType:

    • PS: software-edited image

    • SCREEN_PHOTO: screen photo

    • SCREENSHOT: screenshot

    • ORIGINAL_PHOTO: not an original image

Returned when FraudCheck is true.

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