Periksa apakah gambar input sesuai untuk pembuatan video AnimateAnyone menggunakan API deteksi.
Dokumen ini hanya berlaku untuk wilayah China (Beijing). Untuk menggunakan model, Anda harus menggunakan API key dari wilayah China (Beijing).
Ikhtisar model
|
Model |
Description |
|
animate-anyone-detect-gen2 |
Memeriksa apakah gambar input cocok untuk model animate-anyone-gen2. |
Contoh
Contoh yang lolos
|
Full-body shot |
Half-body shot |
|
|
Contoh yang gagal
|
Side view |
Poor lighting |
Obstructions |
Complex background |
Multiple people |
|
|
|
|
|
|
HTTP
Prasyarat
-
Aktifkan layanan dan dapatkan API key.
Titik akhir permintaan
POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/image2video/aa-detect
Parameter permintaan
|
Field |
Type |
Location |
Required |
Description |
Example |
|
Content-Type |
String |
Header |
Yes |
Format permintaan. |
|
|
Authorization |
String |
Header |
Yes |
API key dengan awalan |
|
|
model |
String |
Body |
Yes |
Nama model deteksi. |
|
|
input.image_url |
String |
Body |
Yes |
URL gambar yang akan diperiksa (harus dapat diakses publik melalui HTTP/HTTPS). |
|
Parameter respons
|
Field |
Type |
Description |
Example |
|
output.check_pass |
Boolean |
Gambar lolos deteksi. |
|
|
output.bodystyle |
String |
Gaya tubuh yang terdeteksi:
|
|
|
output.reason |
String |
Alasan kegagalan deteksi (hanya dikembalikan saat |
|
|
usage.image_count |
Integer |
Gambar telah diperiksa. |
|
|
request_id |
String |
Identifikasi permintaan. |
|
Contoh permintaan
curl --location --request POST 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/image2video/aa-detect' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "animate-anyone-detect-gen2",
"input": {
"image_url":"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251224/pkswoc/p883941.png"
}
}'
Contoh respons sukses
Gambar lolos deteksi
{
"output": {
"bodystyle": "full",
"check_pass": true
},
"usage": {
"image_count": 1
},
"request_id": "76df937d-6eb6-40aa-9ccf-xxxxxx"
}
Gambar gagal deteksi
{
"output":{
"check_pass": false,
"reason": "The input image has no human body. Upload another image that contains a single person.",
"bodystyle": ""
},
"usage":{
"image_count": 1
},
"request_id": "c56f62df-724e-9c19-96bd-xxxxxx"
}
Contoh permintaan gagal
{
"code": "InvalidApiKey",
"message": "No API-key provided.",
"request_id": "7438d53d-6eb8-4596-8835-xxxxxx"
}
Langkah selanjutnya
Setelah deteksi berhasil, gunakan gambar tersebut untuk pembuatan video AnimateAnyone.
Kode error
Untuk daftar kode status umum, lihat Kode error.






