All Products
Search
Document Center

Alibaba Cloud Model Studio:EMO image detection API reference

Last Updated:Sep 04, 2025

The EMO-detect model is used to verify that a portrait image complies with the input requirements for the EMO video generation model. This document describes how to call the API to use the image detection feature of this model.

Important

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 designed to verify that input images comply with the portrait image specifications required by the EMO model.

HTTP

Feature description

This model is used to detect whether 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 Get your API key.

Input limitations

  • Image format: The image must be in the JPG, JPEG, PNG, BMP, or WebP format.

  • Image resolution: The shortest side of the image must be at least 400 pixels, and the longest side must be no more than 7,000 pixels.

  • You must upload images using HTTP links. Local file uploads are not supported.

Task submission

POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/face-detect

Request parameters

Parameter

Type

Method

Required

Description

Example

Content-Type

String

Header

Yes

Request type: application/json.

application/json

Authorization

String

Header

Yes

API key. Example: Bearer d1**2a.

Bearer d1**2a

model

String

Body

Yes

Specifies the model to call. In this case, set the value to emo-detect-v1.

emo-detect-v1

input.image_url

String

Body

Yes

  • The URL of the image to be detected.

  • The minimum side length of the image must be greater than or equal to 400 pixels, and the maximum side length must be less than or equal to 7,000 pixels.

  • Supported formats: JPG, JPEG, PNG, BMP, and WebP.

Note

File upload supports only HTTP links. Local file paths are not supported.

http://a/a.jpg

parameters.ratio

String

Body

Yes

The desired aspect ratio for detection and confirmation. Valid values: "1:1" and "3:4". The default value is "1:1".

  • 1:1 is suitable for profile pictures.

  • 3:4 is suitable for half-length portraits.

"ratio": "1:1"

Response parameters

Parameter

Type

Description

Example

output.check_pass

Bool

The check result corresponding to the image list.

"check_pass":true/false

output.face_bbox

Array

  • The bounding box (bbox) of the face area detected by the algorithm. You can use this value as a request parameter for the EMO video generation API.

  • The coordinates of the face area (x1, y1, x2, y2), corresponding to the coordinates of the upper-left and lower-right points.

[10,20,30,40]

output.ext_bbox

Array

  • The bbox of the dynamic area predicted by the algorithm. You can use this value as a request parameter for the EMO video generation API. The aspect ratio of this area is consistent with the aspect ratio in the request parameter.

  • The coordinates of the dynamic area (x1, y1, x2, y2), corresponding to the coordinates of the upper-left and lower-right points.

[10,20,30,40]

request_id

String

The request ID.

7574ee8f-38a3-4b1e-9280-11c33ab46e51

Sample request

curl --location --request POST 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/face-detect' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "emo-detect-v1",
  "input": {
      "image_url":"http://xxx/1.jpg"
  },
  "parameters": {
      "ratio": "1:1"
  }
}'

Sample response (passed)

{
    "output":{
        "check_pass": true,
        "face_bbox":[10,20,30,40], # Face bbox
        "ext_bbox": [40,60,80,90] # Dynamic area bbox
    },
    "usage":{
        "image_count":1
    },
    "request_id":"c56f62df-724e-9c19-96bd-308627cf5262"
}

Sample response (failed)

{
    "output":{
      "check_pass": false, 
      "code": "",
      "message": "",
    },
    "usage":{
        "image_count":1
    },
    "request_id":"c56f62df-724e-9c19-96bd-308627cf5262"
}

Failure reasons

output.message

Reason

Suggestion for user

The input image does not contain a person. Please upload an image of a single person.

No person is detected in the input image.

No face detected.

The input image contains multiple people. Please upload an image of a single person.

Multiple people are detected in the input image.

Please upload a photo of a single person.

The proportion of the person in the image is too large or too small. Please upload a different image.

The proportion of the person in the uploaded image does not meet the requirements.

The proportion of the face in the uploaded image is too large or too small.

The image resolution is invalid. Ensure that the longest side of the image is less than 7,000 pixels and the shortest side is greater than 400 pixels.

The size of the uploaded image does not meet the requirements.

The resolution cannot be lower than 400 × 400.

The resolution cannot be higher than 7,000 × 7,000.

The image quality is invalid. Please upload a clearer image.

The uploaded image is too dark and does not meet the requirements.

Please ensure that the face in the image is clear.

The person's pose is invalid. Please upload a frontal-view image.

The person in the uploaded image is facing away from the camera, which does not meet the requirements.

Please ensure that the person in the image is facing the camera.

The facial pose is invalid. Please upload an image that shows the entire face.

The facial pose of the person in the uploaded image does not meet the requirements (the face must be visible).

Please ensure that the face in the image is complete and not occluded.

The facial pose is invalid. Please upload an image with the correct orientation.

The facial pose of the person in the uploaded image does not meet the requirements (the face orientation must not have a critical offset).

Please ensure that the face in the image is not tilted.

The person's pose is invalid. Please upload an image that shows the full body, or change the aspect ratio to 1:1.

The person's pose in the uploaded image does not meet the requirements. The head must be fully visible for a profile picture, and the body above the hips must be fully visible for a half-length portrait.

Please ensure that the face in the image is fully visible (for the 1:1 aspect ratio).

Please ensure that the upper body of the person in the image is fully visible (for the 3:4 aspect ratio).

Status codes

For information about the common status codes, see Error messages.

This model also has the following specific error codes:

HTTP return code

code

message

Description

400

InvalidParameter

The request is missing required parameters or in a wrong format, please check the parameters that you send.

The request parameter format is incorrect.

400

InvalidParameter.Ratio

The request parameter is invalid, please check the request parameter.

The aspect ratio parameter is invalid. Valid values: "1:1" and "3:4".

400

InvalidURL

The request URL is invalid, please check the request URL is available and the request image format is one of the following types: JPEG, JPG, PNG, BMP, and WebP.

Failed to download the input image. Check the network connection or the input format.

400

InvalidFile.NoHuman

The input image has no human body. Please upload other image with single person.

No person is detected in the input image.

400

InvalidFile.MultiHuman

The input image has multi human bodies. Please upload other image with single person.

Multiple people are detected in the input image.

400

InvalidFile.BodyProportion

The proportion of the detected person in the picture is too large or too small, please upload other image.

The proportion of the person in the uploaded image does not meet the requirements.

400

InvalidFile.Resolution

The image resolution is invalid, please make sure that the largest length of image is smaller than 7000, and the smallest length of image is larger than 400.

The shortest side must be at least 400 pixels, and the longest side must not exceed 7,000 pixels.

400

InvalidFile.Value

The value of the image is invalid, please upload other clearer image.

The uploaded image is too dark and does not meet the requirements.

400

InvalidFile.FrontBody

The pose of the detected person is invalid, please upload other image with the front view.

The person in the uploaded image is facing away from the camera, which does not meet the requirements.

400

InvalidFile.FullFace

The pose of the detected face is invalid, please upload other image with whole face.

The facial pose of the person in the uploaded image does not meet the requirements (the face must be visible).

400

InvalidFile.FacePose

The pose of the detected face is invalid, please upload other image with the expected oriention.

The facial pose of the person in the uploaded image does not meet the requirements (the face orientation must not have a critical offset).

400

InvalidFile.FullBody

The pose of the detected person is invalid, please upload other image with whole body, or change the ratio parameter to 1:1.

The pose of the person in the uploaded image does not meet the requirements (the head must be fully visible for a profile picture, and the body above the hips must be fully visible for a half-length portrait).