Riferimento API di Talking Avatar
Video parlato con labiale sincronizzato da un ritratto e una voce
Con una sola chiave API di PopNow chiami Talking Avatar dal tuo codice. Qui trovi gli ID del modello da inviare, ogni campo di input accettato, quanti crediti costa ogni richiesta e una richiesta da incollare nel terminale così com’è.
Le descrizioni dei parametri provengono dallo schema di input del modello e sono disponibili solo in inglese.
In sintesi
- Sviluppato da
- PopNow
- Risultato
- Video
- Da
- 2.7 crediti per secondo generato ($0.027)
- ID del modello
1 credito = 0,01 $. All’accettazione l’attività trattiene l’importo massimo possibile e alla fine addebita il consumo reale, arrotondato al credito superiore; il resto viene sbloccato. Le attività non riuscite non vengono addebitate. Per conoscere la cifra esatta prima di eseguire, chiama POST /api/v1/jobs/quote.
Avatar parlante
popnow/talking-avatar-v1/talking-avatar
Prezzo
| Opzione | Crediti (per secondo generato) | Dollari USA |
|---|---|---|
Predefinito | 2.7 | $0.027 |
Parametri
| Campo | Tipo | Predefinito | Valori ammessi | A cosa serve |
|---|---|---|---|---|
image_urlObbligatorio | string | — | — | Portrait of the person who will speak. One clearly visible face, looking roughly at the camera, works best. |
audio_urlObbligatorio | string | — | — | 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. |
promptFacoltativo | string | — | fino a 1000 caratteri | Optional note on expression or mood, such as calm or cheerful. Identity and setting come from the portrait. |
mask_urlFacoltativo | string | — | — | 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. |
seedFacoltativo | integer | — | da 0 a 2147483647 | Random seed for controlled comparisons. |
Richiesta di esempio
Questa richiesta funziona così com’è; i campi omessi usano il valore predefinito. Prima salva la tua chiave in POPNOW_API_KEY.
L’esempio usa file di prova di PopNow in audio_url, image_url. Sostituiscili con i tuoi link HTTPS pubblici, file caricati o asset salvati.
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 risposta contiene subito un taskId. Recupera il risultato con GET /api/v1/jobs/recordInfo, oppure aggiungi callBackUrl per ricevere una notifica.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
