The wan2.2-s2v-detect model checks if an input image meets the input specifications of the wan2.2-s2v model.
This document applies only to the China (Beijing) region. To use this model, you must use an API key from the China (Beijing) region.
Model and pricing
Model | Unit price | Rate limit (shared by Alibaba Cloud account and RAM users) | |
RPS limit for task submission API | Concurrent tasks | ||
wan2.2-s2v-detect | $0.000574/image | 5 | No limit for sync APIs |
HTTP API call
This model checks whether an input image meets the portrait image specifications required by the wan2.2-s2v model.
Prerequisites
Activate the service and obtain an API key.
Set the API key as an environment variable.
Image detection API
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/face-detectRequest parameters
Field | Type | Parameter passing method | Required | Description | Example |
Content-Type | String | Header | Yes | Request type: application/json. | application/json |
Authorization | String | Header | Yes | The API key. The format is Bearer sk-xxx. | Bearer sk-1a**2b |
model | String | Body | Yes | The name of the model to call. | wan2.2-s2v-detect |
input.image_url | String | Body | Yes | The URL of the image to detect.
| http://aaa/bbb.jpg |
Response parameters
Field | Type | Description | Example |
output.check_pass | Bool | The detection result. `true` indicates that the check passed. `false` indicates that the check failed. | true |
output.humanoid | Bool | Indicates whether a human portrait was detected. `true` indicates yes. `false` indicates no. | true |
usage.image_count | Integer | The number of images detected in this request. The value is fixed at 1. | 1 |
request_id | String | The unique ID of this request. | 7574ee8f-38a3-4b1e-9280-11c33ab46e51 |
Request example
curl 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/face-detect' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "wan2.2-s2v-detect",
"input": {
"image_url": "https://img.alicdn.com/imgextra/i3/O1CN011FObkp1T7Ttowoq4F_!!6000000002335-0-tps-1440-1797.jpg"
}
}'Response example (passed)
{
"output":{
"check_pass": true,
"humanoid": true
},
"usage":{
"image_count":1
},
"request_id":"c56f62df-724e-9c19-96bd-xxxxxx"
}Response example (failed)
{
"output":{
"check_pass": false,
"code": "",
"message": "",
},
"usage":{
"image_count":1
},
"request_id":"c56f62df-724e-9c19-96bd-xxxxxx"
}Billing and Rate limit
Billing rules
Billable item: You are billed for the number of successfully generated images on a pay-as-you-go basis.
Billing formula: Fee = Unit price × Number of images.
Consumption order: Free quotas are consumed first. After your free quota is used up, the pay-as-you-go billing method is used by default.
You can enable the "Free quota only" option to prevent charges after your free quota is exhausted. For more information, see Free quota for new users.
No charge for failures: Failed model calls or processing errors do not incur fees or consume free quotas.
Free quotas
For more information about how to claim, query, and use free quotas, see Free quota for new users.
Query usage
Approximately one hour after a model call is complete, you can go to the Model Observation (Singapore) page to view metrics such as usage, number of calls, and success rate.
If you use a model in the China (Beijing) region, go to the Model Observation page for the China (Beijing) region.
Rate limiting
For rate limiting rules and FAQ, see Rate limits.
Error codes
If a model call fails and returns an error message, refer to Error messages for a solution.