All Products
Search
Document Center

Alibaba Cloud Model Studio:EMO image detection API reference

Last Updated:Dec 26, 2025

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.

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 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-detect

Request 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

  • The URL of the image to detect.

  • The shortest side must be 400 pixels or more. The longest side must be 7,000 pixels or less.

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

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".

  • 1:1 is for profile pictures.

  • 3:4 is for half-length portraits.

"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

  • 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 face area coordinates (x1, y1, x2, y2), which correspond to 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 the same as the aspect ratio in the request.

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

[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.