全部產品
Search
文件中心

Alibaba Cloud Model Studio:LivePortrait映像檢測API參考

更新時間:Dec 20, 2025

LivePortrait-detect模型,用於確認輸入的人物肖像圖片是否符合LivePortrait模型的輸入規範。本文檔介紹了該模型提供的映像檢測能力的API調用方法。

重要

本文檔僅適用於“中國大陸(北京)”地區。如需使用模型,需使用“中國大陸(北京)”地區的API Key

模型概覽

模型名

模型簡介

liveportrait-detect

liveportrait-detect是一個特定的映像檢測模型,用於檢測輸入的圖片是否滿足liveportrait模型所需的人物肖像圖片規範。

HTTP調用介面

功能描述

該模型用於檢測輸入的圖片是否滿足“LivePortrait 視頻產生”所需的人物肖像圖片規範。

前提條件

輸入限制

  • 映像格式為jpeg、jpg、png、bmp、webp。

  • 影像檔<10M,寬高比≤2,最大邊長≤4096像素。

  • 上傳圖片僅支援HTTP連結方式,不支援本地連結方式。

作業提交介面調用

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

入參描述

欄位

類型

傳參方式

必選

描述

樣本值

Content-Type

String

Header

請求類型:application/json。

application/json

Authorization

String

Header

API-Key,例如:Bearer d1**2a。

Bearer d1**2a

model

String

Body

指明需要調用的模型,此處用liveportrait-detect。

liveportrait-detect

input.image_url

String

Body

需要檢查的映像 URL。

  • 影像檔<10M,寬高比≤2,最大邊長≤4096。

  • 格式支援:jpeg、jpg、png、bmp、webp。

說明

上傳檔案僅支援HTTP連結方式,不支援本地連結方式。

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

出參描述

欄位

類型

描述

樣本值

output.pass

Bool

所提交映像對應的檢查結果

"pass":true/false

output.message

String

所提交映像對應的檢查結果資訊

"message":No human face detected.

request_id

String

本次請求的系統唯一碼

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

檢查不通過原因

output.message

原因說明

No human face detected

未檢測到人臉(包含人臉過小、側臉、遮擋等情況)

請求樣本
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": "liveportrait-detect",
  "input": {
      "image_url":"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250911/ynhjrg/p874909.png"
  }
}'
響應樣本(通過
{
    "output": {
        "pass": true,
        "message": ""
    },
    "usage": {
        "image_count": 1
    },
    "request_id": "a92e2ffd-9263-44ba-92c5-xxxxxx"
}
響應樣本(不通過)
{
  "output":{
    "pass": false,
    "message": "No human face detected."
  },
  "usage":{
    "image_count":1
  },
  "request_id":"c56f62df-724e-9c19-96bd-308627cf5262"
}
響應樣本(錯誤
{
  "code": "InvalidParameter.UnsupportedFileFormat",
  "message": "Input files format not supported.",
  "request_id": "788b30fe-05f6-999f-a0b1-8a37a4504499"
}

狀態代碼說明

大模型服務平台通用狀態代碼請查閱:錯誤資訊