All Products
Search
Document Center

ID Verification:FACE_DEEPFAKE

Last Updated:Jan 14, 2026

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

API information

The deepfake detection service analyzes face images or videos to identify potential deepfake risks. The service provides the following two API operations to support different data submission methods:

DeepfakeDetectIntlStream

This operation uploads image or video data directly as a file stream and is designed for 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

This operation submits image or video data using a public URL or 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 for images and videos apply to both the DeepfakeDetectIntlStream and DeepfakeDetectIntl API operations.

The deepfake detection algorithm analyzes data from multiple dimensions, such as business, device, and behavior. This algorithm is ideal for scenarios where you use a face detection SDK and want to enhance the detection of forged faces. To ensure stable model performance, submit images or videos of a face captured by a front-facing camera at a normal angle. The images and videos must also meet the following requirements:

Images

  • Image format: JPG, JPEG.

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

  • Image 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. You can scale the shorter side to 720 pixels and use a compression ratio of 0.8.

  • Image quality: The image must be clear and have normal exposure. The face must not be too dark, too bright, or have halos.

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

Videos

  • Video format: MP4, MOV.

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

  • Video length: 1 to 3 seconds.

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

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

Note

For videos, the service extracts 8 frames by default for model processing. This default behavior is for performance reasons related to the Qwen Large Language Model (LLM). To ensure detection accuracy, 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. You can use this ID to query related records in the console.

The ID must be a 10-character string that contains 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 abbreviation for the merchant. The middle part can contain a time period. The last part can be a random or an 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 a long time. Set the timeout period to more than 3 seconds.

IMAGE

FaceUrl

string

No

  • DeepfakeDetectIntl: Submit data using FaceUrl or FaceBase64. You must specify one of them.

  • DeepfakeDetectIntlStream: Submit data using FaceUrl, FaceBase64, or FaceFile. You must specify one of them.

Enter the URL of a 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 them using a URL.

/9j/4AAQSkZJRgABAQAASxxxxxxx

FaceFile

string

The file stream of the face image or video.

Response parameters

Name

Type

Description

Example

RequestId

String

The request ID.

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

Code

String

Return codes.

Success

Message

String

The detailed description of the response 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 (,), and 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. The corresponding tag is returned when a risk is detected.

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

Return 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 both SourceFacePicture and SourceFacePictureUrl, or you passed both TargetFacePicture and TargetFacePictureUrl.

401

DownloadTimeout

The image download from the URL timed out.

403

Forbidden.RAMUserAccessDenied

Grant the AliyunAntCloudAuthFullAccess permission to the Resource Access Management (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.