All Products
Search
Document Center

Alibaba Cloud Model Studio:LivePortrait image detection API reference

Last Updated:Oct 15, 2025

The LivePortrait-detect model verifies whether input portrait images meet the specifications required by LivePortrait. This topic describes how to call the API for the image detection capabilities provided by this model.

Important

This document applies only to the China (Beijing) region. To use the model, you must use an API key from the China (Beijing) region.

Model overview

Model

Introduction

liveportrait-detect

liveportrait-detect is a specialized image detection model used to check whether the input image meets the portrait image specifications required by the liveportrait model.

HTTP

Feature description

This model detects whether the input image meets the portrait image specifications required by "LivePortrait video generation".

Prerequisites

  • You have activated Alibaba Cloud Model Studio and obtained an API key. For more information, see Obtain API Key.

Input limitations

  • Image formats: JPEG, JPG, PNG, BMP, WebP.

  • Image file must be less than 10 MB, with an aspect ratio of 2 or less, and maximum edge length of 4096 pixels.

  • Only HTTP link method is supported for uploading images. Local link method is 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, for example: Bearer d1**2a.

Bearer d1**2a

model

String

Body

Yes

Specifies the model to be called, use liveportrait-detect here.

liveportrait-detect

input.image_url

String

Body

Yes

URL of the image to be checked.

  • Image file <10M, aspect ratio ≤2, maximum edge length ≤4096.

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

Note

File uploads support only HTTP links, not local file paths.

"image_url": "http://a/a.jpg"

Response parameters

Parameter

Type

Description

Example

output.pass

Bool

Check result for the submitted image

"pass":true/false

output.message

String

Check result information for the submitted image

"message":No human face detected.

request_id

String

Unique system code for this request

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

Failure reason

output.message

Description

No human face detected

No face detected (including cases where the face is too small, profile view, occlusion, etc.)

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": "liveportrait-detect",
  "input": {
      "image_url":"http://xxx/1.jpg"
  }
}'
Sample response (passed)
{
  "output":{
    "pass": true
    "message": 'success'
  },
  "usage":{
    "image_count":1
  },
  "request_id":"c56f62df-724e-9c19-96bd-308627cf5262"
}
Sample response (failed)
{
  "output":{
    "pass": false
    "message": "No human face detected."
  },
  "usage":{
    "image_count":1
  },
  "request_id":"c56f62df-724e-9c19-96bd-308627cf5262"
}
Sample response (error)
{
  "code": "InvalidParameter.UnsupportedFileFormat",
  "message": "Input files format not supported.",
  "request_id": "788b30fe-05f6-999f-a0b1-8a37a4504499"
}

Status codes

For general status codes, see Error messages.