PopNowDocs API
Contenu principal

Référence API de Talking Avatar

Vidéo parlante synchronisée à partir d’un portrait et d’une voix

Une seule clé API PopNow suffit pour appeler Talking Avatar 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
PopNow
Résultat
Vidéo
À partir de
2.7 crédits par seconde produite ($0.027)

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.

Avatar parlant

popnow/talking-avatar-v1/talking-avatar

Prix

OptionCrédits (par seconde produite)Dollars US
Par défaut2.7$0.027

Paramètres

ChampTypeValeur par défautValeurs admisesRôle
image_urlObligatoirestring——Portrait of the person who will speak. One clearly visible face, looking roughly at the camera, works best.
audio_urlObligatoirestring——Speech that drives the lips, 3 to 60 seconds, MP3 or WAV. The video runs as long as this audio; files outside that range are rejected before any charge.
promptFacultatifstring—jusqu’à 1 000 caractèresOptional note on expression or mood, such as calm or cheerful. Identity and setting come from the portrait.
mask_urlFacultatifstring——Optional black-and-white mask the same size as the portrait, white over the person who should speak. Only needed when the portrait shows several people.
seedFacultatifinteger—de 0 à 2147483647Random seed for controlled comparisons.

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 audio_url, image_url. Remplacez-les par vos propres liens HTTPS publics, fichiers envoyés ou ressources enregistrées.

POST /api/v1/jobs/createTask
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": "popnow/talking-avatar-v1/talking-avatar",
  "input": {
    "prompt": "Speaks warmly to the camera with natural head movement and a relaxed smile",
    "image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
    "audio_url": "https://media.popnow.ai/shortfilm/voices/Aoede-46e4c427.mp3"
  }
}'

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.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Pour aller plus loin

Sur cette page