All Products
Search
Document Center

ID Verification:Synchronous call - CREDENTIAL_RECOGNITION

Last Updated:Sep 14, 2026

Call the CredentialRecognitionIntl operation to extract key information from credential images and detect forgery. This synchronous operation returns results immediately.

API information

  • API operation name: CredentialRecognitionIntl

  • Description: Extracts key information from a credential image and detects forgery using AI.

  • 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. Credential forgery detection is AI-based and achieves 90% accuracy on internal test datasets. Actual accuracy may vary across sample scenarios.

  2. Detection is more effective for native camera images than for digitally synthesized or software-edited images.

  3. Do not rely on forgery detection as the sole verification method. Use it as an auxiliary tool to improve manual review efficiency.

  4. Forgery detection applies to electronic document review scenarios such as financial payment acquisition and e-commerce merchant onboarding. For other 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 debug this operation directly in OpenAPI Explorer, and generate SDK sample code for this operation.

Request parameters

Images for the CredentialOcrPictureBase64 or CredentialOcrPictureUrl parameter must meet these requirements:

  • Image format: PNG, JPG, JPEG, BMP, and WebP.

  • Image dimensions: Width and height must each be greater than 15 pixels and less than 8192 pixels. Aspect ratio must be less than 50.

    Note

    For optimal results, use images with width and height greater than 500 pixels.

  • Image size: Maximum 10 MB for CredentialOcrPictureUrl, or 3 MB for CredentialOcrPictureBase64.

    Note

    Large images increase response time. Use images smaller than 3 MB when possible.

Name

Type

Required

Description

Example

ProductCode

string

Yes

The value is fixed to CREDENTIAL_RECOGNITION.

CREDENTIAL_RECOGNITION

CredentialOcrPictureBase64

string

No

The Base64-encoded image. Verify the image size before encoding.

-

CredentialOcrPictureUrl

string

No

The publicly accessible HTTP or HTTPS URL of the image.

https://***

DocType

string

Yes

The credential type:

  • 01: Transaction receipt, including electronic bills such as water, electricity, gas, and credit card bills.

  • 03: Transaction record for a transfer.

  • 04: Proof of address.

01

OcrArea

string

Yes

The extraction type:

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

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

  • 0401: Information extracted from a proof of address.

0101

FraudCheck

string

Yes

Whether to enable tampering detection.

  • true: Enable

  • false: Disable

true

IdQuality

string

No

Whether to enable quality detection.

  • Y: Enable

  • N: Disable

Y

CheckRuleConfig

string

No

The configuration of field validation rules in the JSON string format.

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

OcrValueStandard

string

No

Whether to enable standardization of OCR results.

  • 0: Disable

  • 1: Enable

0

OcrTranslation

string

No

Whether to enable translation.

  • 0: Disable

  • 1: Enable

0

Response parameters

Name

Type

Description

Example

HTTP Status Code

Integer

The HTTP status code.

200

HTTP Body

RequestId

String

The request ID.

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

Result.TransactionId

String

The unique transaction ID.

hksb7ba1b28130d24e015d694361b****

Code

String

Return code: For more information, see Server-side HTTP status codes.

Important
  • Indicates whether the call succeeded.

  • For verification results, check the ResultObject fields.

Success

Message

String

The response message.

success

Result.Success

String

The extraction result:

  • S: Success

  • F: Failed

S

Result.SubCode

String

The verification result description. ResultObject.SubCode error codes.

200

Result.ExtIdInfo

String

JSON format as shown in the example. Result.ExtIdInfo.

  • If the OcrArea request parameter is set to 0101:

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

    {
      // If 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 and suggestion

200

Yes

Extraction successful.

204

Yes

Inconsistent key information.

211

Yes

The file quality or resolution does not meet the requirements. Ensure the file is clear, has normal exposure, is complete and unobstructed, and has no significant angular bias.

212

Yes

The anti-counterfeiting check detected a threat. This may be due to high-risk operations such as screen recapture, tampering, or photocopying.

213

Yes

The file type is incorrect. Ensure the file type matches the specified document type.

Result.ExtIdInfo

Name

Type

Description

Example

recInfo

String

The extracted key information.

Note

If the extraction fails, this field is empty.

  • If the OcrArea request parameter is set to 0101:

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

    {
      "money": "$41.41"
    }

spoofInfo

String

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

  • spoofResult:

    • Y: Risk detected

    • N: Normal

  • spoofType:

    • PS: The image was edited with software.

    • SCREEN_PHOTO: The image is a photo of a screen.

    • SCREENSHOT: The image is a screenshot.

    • ORIGINAL_PHOTO: The image is not the original one.

Returned when tampering detection is enabled (FraudCheck is set to true).

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