The EMO-detect model validates that an input portrait image meets the specifications for the EMO video generation model. This document describes how to call the API to use this image detection feature.
This document applies only to the China (Beijing) region. To use the model, you must use an API key for the China (Beijing) region.
Model overview
Model | Description |
emo-detect-v1 | emo-detect-v1 is a specific image detection model that checks if an input image meets the portrait specifications required by the EMO model. |
HTTP
Feature description
This model verifies that an input image meets the portrait specifications required for EMO video generation.
Prerequisites
You have activated Alibaba Cloud Model Studio and obtained an API key. See Create an API key.
Input limitations
Image format: JPG, JPEG, PNG, BMP, or WebP.
Image resolution: The shortest side must be at least 400 pixels, and the longest side must be no more than 7,000 pixels.
Images must be uploaded using HTTP links. Local file uploads are not supported.
API endpoint
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/face-detectRequest parameters
Field | Type | Method | Required | Description | Example |
Content-Type | String | Header | Yes | The request type. Set this to application/json. | application/json |
Authorization | String | Header | Yes | The API key. Example: Bearer d1**2a. | Bearer d1**2a |
model | String | Body | Yes | The model to call. Set this to emo-detect-v1. | emo-detect-v1 |
input.image_url | String | Body | Yes |
Note File uploads support only HTTP links, not local file paths. | http://a/a.jpg |
parameters.ratio | String | Body | Yes | The aspect ratio to check. Valid values: "1:1" and "3:4". Default: "1:1".
| "ratio": "1:1" |
Response parameters
Parameter | Type | Description | Example |
output.check_pass | Boolean | The check result for the submitted image. `true` indicates that the check passed. `false` indicates that the check failed. | true |
output.face_bbox | Array |
| [10,20,30,40] |
output.ext_bbox | Array |
| [10,20,30,40] |
usage.image_count | Integer | The number of images detected. This parameter is used for billing. | 1 |
code | String | The error code that is returned if the request fails. For more information, see Status codes. | InvalidApiKey |
message | String | The detailed error message that is returned if the request fails. For more information, see Status codes. | No API-key provided. |
request_id | String | The unique ID of the request. | 7574ee8f-38a3-4b1e-9280-xxxxx |
Sample request
curl --location '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": "emo-detect-v1",
"input": {
"image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251225/onmomb/emo.png"
},
"parameters": {
"ratio": "1:1"
}
}'Sample response (successful request)
Image check passed
{
"output":{
"check_pass": true,
"face_bbox":[302,286,610,593], # Face bbox
"ext_bbox":[71,9,840,778] # Dynamic area bbox
},
"usage":{
"image_count":1
},
"request_id":"c56f62df-724e-9c19-96bd-xxxxxx"
}Image check failed
{
"output":{
"check_pass": false,
"code": "",
"message": ""
},
"usage":{
"image_count":1
},
"request_id":"c56f62df-724e-9c19-96bd-xxxxxx"
}Sample response (failed request)
{
"code":"InvalidApiKey",
"message":"Invalid API-key provided.",
"request_id":"fb53c4ec-1c12-4fc4-a580-xxxxxx"
}Error codes
For information about common status codes, see Error messages.