All Products
Search
Document Center

ID Verification:FACE_DEEPFAKE

Last Updated:Mar 05, 2026

The DeepfakeDetectIntl and DeepfakeDetectIntlStream API operations analyze input face images or videos to detect deepfake risks, such as AI-generated faces, deepfake face swaps, template attacks, and presentation attacks. The response includes risk tags and confidence scores.

API information

The deepfake face detection service analyzes input face images or videos to identify potential deepfake threats. It provides two API operations to support different data submission methods:

DeepfakeDetectIntlStream

This operation supports the direct upload of image or video data as a file stream. Use this operation when processing local files.

  • Request method: HTTPS POST

  • This API operation has a dedicated QPS limit. For more information, see QPS limits for ID Verification server-side API operations.

  • Endpoints:

    Note
    • Benefits of internal network access: An internal network is a private communication network between Alibaba Cloud products within the same region. If your business server is deployed in the corresponding Alibaba Cloud region, you can use the internal same-region endpoint to access the ID Verification service. This provides more secure and stable communication.

    • Optimization suggestions for access from outside China: Network environments outside China can be complex. To optimize your integration solution, reduce network latency, and minimize request failures, see Server-side network latency analysis and optimization.

    Singapore

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

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

DeepfakeDetectIntl

Use this operation to submit image or video data using a public URL or as a Base64-encoded string.

  • Request method: HTTPS POST

  • This API operation has a dedicated QPS limit. For more information, see QPS limits for ID Verification server-side API operations.

  • Endpoints:

    Note
    • Benefits of internal network access: An internal network is a private communication network between Alibaba Cloud products within the same region. If your business server is deployed in the corresponding Alibaba Cloud region, you can use the internal same-region endpoint to access the ID Verification service. This provides more secure and stable communication.

    • Optimization suggestions for access from outside China: Network environments outside China can be complex. To optimize your integration solution, reduce network latency, and minimize request failures, see Server-side network latency analysis and optimization.

    Singapore

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

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

Online debugging and integration

Note

Before you debug and integrate an API operation, see Debug and integrate server-side API operations using OpenAPI Explorer for information about how to call API operations and obtain SDKs and sample code in OpenAPI Explorer.

Image and video requirements

Note

The following requirements apply to both the DeepfakeDetectIntlStream and DeepfakeDetectIntl operations.

The deepfake detection algorithm works best when it is combined with multi-dimensional data, such as business context, device information, and user behavior. The algorithm is ideal for scenarios where you already use a face detection SDK and want to enhance forged-face detection. To ensure stable model performance, submit face images or videos that are captured by a front-facing camera at a normal angle and meet the following requirements:

Images

  • Format: JPG or JPEG.

  • Size: The recommended size is 50 KB to 100 KB. The maximum size is 10 MB. For images larger than 1 MB, you must upload them using a URL.

  • Resolution: The recommended resolution is 640 × 480 pixels (height × width). The maximum resolution is 1920 × 1080 pixels (height × width). The height must be greater than the width. If you scale the image, scale the shorter side to 720 pixels and use a compression ratio of 0.8.

  • Quality: The image must be clear and have normal exposure. Avoid faces that are too dark, too bright, or have halos.

  • Multiple faces: If an image contains multiple faces, the system detects the largest face by default.

Videos

  • Format: MP4 or MOV.

  • Size: The video must be larger than 100 KB. The maximum size is 10 MB. For videos larger than 1 MB, you must upload them using a URL.

  • Length: 1 to 3 seconds.

  • Resolution: The recommended resolution is 640 × 480 pixels (height × width).

  • Frame rate: 8 frames per second (fps) or higher.

Note

For videos, the service extracts 8 frames by default for processing by the Qwen large model. To ensure accurate detection, do not submit invalid videos.

Request parameters

Name

Type

Required

Description

Example

ProductCode

string

Yes

The product to integrate.

Set the value to FACE_DEEPFAKE.

FACE_DEEPFAKE

SceneCode

string

Yes

A custom authentication scenario ID. Use this ID to query related records in the console.

The ID must be a 10-character string containing letters, digits, and underscores (_).

1234567890

MerchantBizId

string

Yes

A unique identifier for the merchant request. It must be a 32-character alphanumeric string.

The first few characters are a custom merchant abbreviation. The middle part can include a timestamp. The last part can be a random or incremental sequence.

e0c34a77f5ac40a5aa5e6ed20c******

FaceInputType

string

No

The input type of the face material:

  • IMAGE (default): A face image.

  • VIDEO: A face video.

    Note

    Video processing takes longer. Set the timeout to more than 3 seconds.

IMAGE

FaceUrl

string

No

  • DeepfakeDetectIntl: Submit data using either FaceUrl or FaceBase64. Choose one.

  • DeepfakeDetectIntlStream: Submit data using FaceUrl, FaceBase64, or FaceFile. Choose one.

The URL of the face image or video.

https://cn-shanghai-aliyun-cloudauth-xxxxxx.oss-cn-shanghai.aliyuncs.com/verify/xxxxx/xxxxx.jpeg

FaceBase64

string

The Base64-encoded face image. For videos, upload using a URL.

/9j/4AAQSkZJRgABAQAASxxxxxxx

FaceFile

string

Face image or video file stream.

Response parameters

Note

Because the detection model was upgraded to a large model for classification, the response has changed as follows:

  • The Result field no longer returns the value 2 (suspicious).

  • The RiskTag field no longer includes SuspectPSFace.

  • When the RiskScore field indicates a risk, it returns a fixed value of 0.96.

Name

Type

Description

Example

RequestId

String

The request ID.

8FC3D6AC-9FED-4311-8DA7-C4BF47D9****

Code

String

Status code.

Success

Message

String

A detailed description of the status code.

success

ResultObject

Result

String

The risk result:

  • 0: Low risk

  • 1: High risk

  • 2: Suspicious

1

RiskTag

String

The risk tag. Multiple tags are separated by commas (,). Tags include the following:

  • SuspectDeepForgery: Suspected deepfake

  • SuspectPSFace: Suspected synthetic attack

  • SuspectTemple: Suspected template attack

  • SuspectRemake: Suspected presentation attack

SuspectDeepForgery

RiskScore

Map

A map of risk scores. Returns the corresponding tag when a risk is detected.

{
 "SuspectPSFace": "0.9796",
 "SuspectRemake": "0.0000",
 "SuspectDeepForgery": "0.9500",
 "SuspectTemple":"0.9500"
 }

Status codes

HTTP Status Code

Code

Description

200

Success

The request was successful.

400

MissingParameter

A parameter cannot be empty.

400

InvalidParameter

The parameter is invalid.

401

NoFaceDetected

Feature extraction failed for the face in the custom source image. Upload a different image.

401

UnqualifiedPhoto

The uploaded image is unreadable or its resolution does not meet the requirements. Replace the image. Make sure that the photo is clear, properly exposed, complete, and unobscured, and that the subject's head has no significant tilt.

401

ToolargeImage

The image is too large. Compress the image or use a different upload method.

401

DataDuplication

You passed images using both Base64 and URL methods simultaneously.

401

DownloadTimeout

The image download from the URL timed out.

403

Forbidden.RAMUserAccessDenied

Grant the AliyunAntCloudAuthFullAccess permission to the RAM user. For more information, see Grant a RAM user permissions to access the service.

403

Forbidden.AccountAccessDenied

Make sure that you have activated ID Verification and that your account does not have an overdue payment.

403

Throttling.Api

The API call is blocked by throttling.

500

InternalError

An internal system error occurred. Contact technical support.