The LivePortrait-detect model checks whether input images meet LivePortrait specifications. This document describes how to call the detection API.
Model overview
Model | Description |
|---|---|
liveportrait-detect | The model detects whether input images meet portrait specifications required by the liveportrait model. |
HTTP
Feature description
This feature detects whether input images meet portrait specifications required for LivePortrait video generation.
Prerequisites
- Create an API key in Alibaba Cloud Model Studio. See Obtain an API key.
Input limitations
- Supported image formats: JPEG, JPG, PNG, BMP, and WebP.
- Image must be <10 MB with aspect ratio ≤2 and max edge ≤4096 pixels.
- Upload images via HTTP URLs only (local paths are not supported).
Task submission
Request parameters
Field | Type | Parameter passing | Required | Description | Example |
|---|---|---|---|---|---|
Content-Type | String | Header | Yes | Request content type (set to application/json). | application/json |
Authorization | String | Header | Yes | API key in Bearer format. | Bearer d1**2a |
model | String | Body | Yes | Model name (set to liveportrait-detect). | liveportrait-detect |
input.image_url | String | Body | Yes | The URL of the image to check.
File uploads support only HTTP or HTTPS links. Local file paths are not supported. | "image_url": "http://a/a.jpg" |
Response parameters
Field | Type | Description | Example |
|---|---|---|---|
output.pass | Bool | Whether the image passed validation. | "pass":true/false |
output.message | String | Description of the validation result. | "message":No human face detected. |
request_id | String | Unique request identifier. | 7574ee8f-38a3-4b1e-9280-11c33ab46e51 |
Failure reason
output.message | Description |
|---|---|
No human face detected | No face detected. This occurs when the face is too small, in profile, or obstructed. |