Référence API de Wan 2.2 Animate
Anime la photo d’un personnage avec une vidéo de référence
Une seule clé API PopNow suffit pour appeler Wan 2.2 Animate depuis votre code. Vous trouverez ici les identifiants de modèle à envoyer, chaque champ d’entrée accepté, le coût d’une requête en crédits et une requête à coller telle quelle dans un terminal.
Les descriptions des paramètres proviennent du schéma d’entrée du modèle et ne sont disponibles qu’en anglais.
En bref
- Éditeur
- Alibaba
- Résultat
- Vidéo
- À partir de
- 7.95 crédits par seconde produite ($0.0795)
- Durée habituelle
- environ 345 s
- Identifiants de modèle
1 crédit = 0,01 $. À l’acceptation, une tâche réserve le montant maximal possible, puis facture la consommation réelle à la fin, arrondie au crédit supérieur ; le reste est libéré. Une tâche en échec n’est pas facturée. Pour connaître le montant exact avant de lancer, appelez POST /api/v1/jobs/quote.
Contrôle du mouvement
alibaba/wan-2.2-animate/character-animation
Prix
| Option | Crédits (par seconde produite) | Dollars US |
|---|---|---|
480p | 7.95 | $0.0795 |
720p | 16.5 | $0.165 |
Paramètres
| Champ | Type | Valeur par défaut | Valeurs admises | Rôle |
|---|---|---|---|---|
image_urlObligatoire | string | — | — | Character image. The person in this image is the one that gets animated. |
video_urlObligatoire | string | — | — | Driving video, 2 to 30 seconds long; upload an MP4, or pass an MP4 or MOV URL. Its motion is transferred to the character and its length sets the output length. Videos outside that range are rejected before any charge. |
animation_modeFacultatif | string | animate | animate, replace | animate drives the character in the image with the motion of the driving video; replace swaps the person in the driving video for the one in the image. |
resolutionFacultatif | string | 720p | 480p, 720p | Output video resolution. |
promptFacultatif | string | — | jusqu’à 2 000 caractères | Optional description of the motion, used to guide animation style and content. |
seedFacultatif | integer | — | de 0 à 2147483647 | Random seed; zero requests a random seed. |
Exemple de requête
Cette requête fonctionne telle quelle ; les champs omis gardent leur valeur par défaut. Placez d’abord votre clé dans POPNOW_API_KEY.
L’exemple utilise des fichiers d’exemple PopNow dans image_url, video_url. Remplacez-les par vos propres liens HTTPS publics, fichiers envoyés ou ressources enregistrées.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "alibaba/wan-2.2-animate/character-animation",
"input": {
"prompt": "The person dances with relaxed, natural movement",
"image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
"video_url": "https://media.popnow.ai/effects/flower-bloom-1abd6efb.mp4",
"resolution": "720p"
}
}'La réponse contient tout de suite un taskId. Récupérez le résultat avec GET /api/v1/jobs/recordInfo, ou ajoutez callBackUrl pour être prévenu.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
