## Basic tool info Model name: pruna/p-video-2-pro-avatar Model description: Create lip-synced talking-head videos from one portrait plus speech audio or a typed script. Choose voice, language, and 480p or 768p MP4 output. Model cover: https://cdn.wiro.ai/uploads/models/pruna-p-video-2-pro-avatar-cover.mp4 Model categories: - tool - use-agent - quick-showcase - partner - pruna - nogpu-pipeline - image-to-video Run Task Endpoint (POST): https://api.wiro.ai/v1/Run/pruna/p-video-2-pro-avatar Get Task Detail Endpoint (POST): https://api.wiro.ai/v1/Task/Detail ## Model Inputs: - name: inputImage label: Input Image help: Required: Portrait used as the first frame. jpg, png or webp, max 20 MB. It sets the aspect ratio of the video type: combinefileinput default: pruna-p-video-2-pro-avatar-sampleinput-1.jpeg - name: script label: Voice Script help: Optional: Exact words the avatar speaks. A voice script or a speech audio is required. Ignored when a speech audio is given type: textarea default: - name: inputAudio label: Speech Audio help: Optional: Speech the avatar lip-syncs to, 1 second to 3 minutes, max 64 MB. The video matches its length. Used instead of the script type: combinefileinput default: - name: voice label: Voice help: Optional: Voice that reads the voice script. Not used with a speech audio type: select default: Zephyr (Female) options: - value: "Zephyr (Female)" label: Zephyr (Female) - value: "Puck (Male)" label: Puck (Male) - value: "Charon (Male)" label: Charon (Male) - value: "Kore (Female)" label: Kore (Female) - value: "Fenrir (Male)" label: Fenrir (Male) - value: "Leda (Female)" label: Leda (Female) - value: "Orus (Male)" label: Orus (Male) - value: "Aoede (Female)" label: Aoede (Female) - value: "Callirrhoe (Female)" label: Callirrhoe (Female) - value: "Autonoe (Female)" label: Autonoe (Female) - value: "Enceladus (Male)" label: Enceladus (Male) - value: "Iapetus (Male)" label: Iapetus (Male) - value: "Umbriel (Male)" label: Umbriel (Male) - value: "Algenib (Male)" label: Algenib (Male) - value: "Despina (Female)" label: Despina (Female) - value: "Erinome (Female)" label: Erinome (Female) - value: "Laomedeia (Female)" label: Laomedeia (Female) - value: "Achernar (Female)" label: Achernar (Female) - value: "Algieba (Male)" label: Algieba (Male) - value: "Schedar (Male)" label: Schedar (Male) - value: "Gacrux (Female)" label: Gacrux (Female) - value: "Pulcherrima (Female)" label: Pulcherrima (Female) - value: "Achird (Male)" label: Achird (Male) - value: "Zubenelgenubi (Male)" label: Zubenelgenubi (Male) - value: "Vindemiatrix (Female)" label: Vindemiatrix (Female) - value: "Sadachbia (Male)" label: Sadachbia (Male) - value: "Sadaltager (Male)" label: Sadaltager (Male) - value: "Sulafat (Female)" label: Sulafat (Female) - value: "Alnilam (Male)" label: Alnilam (Male) - value: "Rasalgethi (Male)" label: Rasalgethi (Male) - name: voiceLanguage label: Voice Language help: Optional: Language of the voice script. Not used with a speech audio type: select default: English (US) options: - value: "English (US)" label: English (US) - value: "English (UK)" label: English (UK) - value: "Spanish" label: Spanish - value: "French" label: French - value: "German" label: German - value: "Italian" label: Italian - value: "Portuguese (Brazil)" label: Portuguese (Brazil) - value: "Japanese" label: Japanese - value: "Korean" label: Korean - value: "Hindi" label: Hindi - name: voicePrompt label: Voice Prompt help: Optional: Delivery instructions for tone, pacing, accent and emotion. Not spoken. Not used with a speech audio type: textarea default: - name: prompt label: Prompt help: Optional: Describe what the video should show. Defaults to "The person is talking." type: textarea default: - name: promptUpsampling label: Prompt Upsampling help: Optional: Adds the scene's own motion from the portrait (rain, lights, background, body movement) after your prompt. Your prompt stays unchanged. False uses the prompt exactly type: select default: true options: - value: "true" label: true - value: "false" label: false - name: resolution label: Resolution help: Required: Output resolution. The video is always 24 fps type: select default: 768p options: - value: "480p" label: 480p - value: "768p" label: 768p - name: seed label: Seed help: Optional: Random seed. Set for reproducible generation type: text default: ## Model Parameter Inspires: - inputImage: https://cdn.wiro.ai/uploads/sampleinputs/pruna-p-video-2-pro-avatar-sampleinput-1.jpeg - script: Hi! Meet the new Aurora smart lamp. One tap sets the mood, and it learns your evening routine all on its own. Brighter mornings, cozier nights. - voice: Zephyr (Female) - voiceLanguage: English (US) - voicePrompt: Upbeat and friendly, like a lifestyle influencer, medium pace. - prompt: The woman talks to the camera with natural hand gestures. - resolution: 768p - inputImage: https://cdn.wiro.ai/uploads/sampleinputs/pruna-p-video-2-pro-avatar-sampleinput-2.jpeg - script: Some cities never sleep. This one just closes its eyes for a while, and waits for the rain to stop. - voice: Charon (Male) - voiceLanguage: English (UK) - voicePrompt: Slow, deep, reflective narration, slightly gravelly. - prompt: The man speaks quietly to the camera. - resolution: 768p - inputImage: https://cdn.wiro.ai/uploads/sampleinputs/pruna-p-video-2-pro-avatar-sampleinput-3.jpeg - script: ¡Hola a todos! Hoy vamos a preparar una paella auténtica. El secreto está en el sofrito y en no remover el arroz. ¡Vamos a cocinar! - voice: Puck (Male) - voiceLanguage: Spanish - voicePrompt: Energetic and passionate, like a TV cooking host. - prompt: The chef talks enthusiastically and gestures with his hands. - resolution: 480p - inputImage: https://cdn.wiro.ai/uploads/sampleinputs/pruna-p-video-2-pro-avatar-sampleinput-4.jpeg - script: こんにちは!今日はとてもいい天気ですね。放課後、一緒に桜を見に行きませんか? - voice: Leda (Female) - voiceLanguage: Japanese - voicePrompt: Soft, gentle and a little shy, youthful tone. - prompt: The girl talks shyly and smiles, tilting her head slightly. - resolution: 768p ## Integration Header Prepare ```bash # Sign up Wiro dashboard and create project export YOUR_API_KEY="{{useSelectedProjectAPIKey}}"; export YOUR_API_SECRET="XXXXXXXXX"; # unix time or any random integer value export NONCE=$(date +%s); # hmac-SHA256 (YOUR_API_SECRET+Nonce) with YOUR_API_KEY export SIGNATURE="$(echo -n "${YOUR_API_SECRET}${NONCE}" | openssl dgst -sha256 -hmac "${YOUR_API_KEY}" | awk '{print $NF}')"; ``` ## Run Command - Make HTTP Post Request ```bash curl -X POST "https://api.wiro.ai/v1/Run/pruna/p-video-2-pro-avatar" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "inputImage": "pruna-p-video-2-pro-avatar-sampleinput-1.jpeg", "script": "", "inputAudio": "", "voice": "Zephyr (Female)", "voiceLanguage": "English (US)", "voicePrompt": "", "prompt": "", "promptUpsampling": "true", "resolution": "768p", "seed": "", "callbackUrl": "You can provide a callback URL; Wiro will send a POST request to it when the task is completed." }'; ``` ## Run Command - Response ```json { "errors": [], "taskid": "2221", "socketaccesstoken": "eDcCm5yyUfIvMFspTwww49OUfgXkQt", "result": true } ``` ## Get Task Detail - Make HTTP Post Request with Task ID ```bash curl -X POST "https://api.wiro.ai/v1/Task/Detail" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "taskid": "2221" }'; ``` ## Get Task Detail - Make HTTP Post Request with Socket Access Token ```bash curl -X POST "https://api.wiro.ai/v1/Task/Detail" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "tasktoken": "eDcCm5yyUfIvMFspTwww49OUfgXkQt" }'; ``` ## Get Task Detail - Response ```json { "total": "1", "errors": [], "tasklist": [ { "id": "2221", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "socketaccesstoken": "eDcCm5yyUfIvMFspTwww49OUfgXkQt", "parameters": {}, "debugoutput": "", "debugerror": "", "starttime": "1734513809", "endtime": "1734513813", "elapsedseconds": "6.0000", "status": "task_postprocess_end", "createtime": "1734513807", "canceltime": "0", "assigntime": "1734513807", "accepttime": "1734513807", "preprocessstarttime": "1734513807", "preprocessendtime": "1734513807", "postprocessstarttime": "1734513813", "postprocessendtime": "1734513814", "totalcost": "0.003510000000", "chargedcost": "0.002808000000", "discountamount": "0.000702000000", "outputs": [ { "id": "6bc392c93856dfce3a7d1b4261e15af3", "name": "0.png", "contenttype": "image/png", "parentid": "6c1833f39da71e6175bf292b18779baf", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "size": "202472", "addedtime": "1734513812", "modifiedtime": "1734513812", "accesskey": "dFKlMApaSgMeHKsJyaDeKrefcHahUK", "url": "https://cdn1.wiro.ai/6a6af820-c5050aee-40bd7b83-a2e186c6-7f61f7da-3894e49c-fc0eeb66-9b500fe2/0.png" } ], "size": "202472" } ], "result": true } ``` totalcost is the list price. chargedcost is the amount actually billed after any discount (a store fee is included on store runs); discountamount is the discount. chargedcost is null until the charge is recorded (shortly after task_postprocess_end) and "0" for a failed or cancelled task. ## Kill Task - Make HTTP Post Request with Task ID ```bash curl -X POST "https://api.wiro.ai/v1/Task/Kill" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "taskid": "534574" }'; ``` ## Kill Task - Make HTTP Post Request with Socket Access Token ```bash curl -X POST "https://api.wiro.ai/v1/Task/Kill" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "socketaccesstoken": "ZpYote30on42O4jjHXNiKmrWAZqbRE" }'; ``` ## Kill Task - Response ```json { "errors": [], "tasklist": [ { "id": "534574", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "name": "", "socketaccesstoken": "ZpYote30on42O4jjHXNiKmrWAZqbRE", "parameters": { "inputImage": "https://api.wiro.ai/v1/File/mCmUXgZLG1FNjjjwmbtPFr2LVJA112/inputImage-6060136.png" }, "debugoutput": "", "debugerror": "", "starttime": "1734513809", "endtime": "1734513813", "elapsedseconds": "6.0000", "status": "task_cancel", "cps": "0.000585000000", "totalcost": "0.003510000000", "guestid": null, "projectid": "699", "modelid": "598", "description": "", "basemodelid": "0", "runtype": "model", "modelfolderid": "", "modelfileid": "", "callbackurl": "", "marketplaceid": null, "createtime": "1734513807", "canceltime": "0", "assigntime": "1734513807", "accepttime": "1734513807", "preprocessstarttime": "1734513807", "preprocessendtime": "1734513807", "postprocessstarttime": "1734513813", "postprocessendtime": "1734513814", "pexit": "0", "categories": "["tool","image-to-image","quick-showcase","compare-landscape"]", "outputs": [ { "id": "6bc392c93856dfce3a7d1b4261e15af3", "name": "0.png", "contenttype": "image/png", "parentid": "6c1833f39da71e6175bf292b18779baf", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "size": "202472", "addedtime": "1734513812", "modifiedtime": "1734513812", "accesskey": "dFKlMApaSgMeHKsJyaDeKrefcHahUK", "foldercount": "0", "filecount": "0", "ispublic": 0, "expiretime": null, "url": "https://cdn1.wiro.ai/6a6af820-c5050aee-40bd7b83-a2e186c6-7f61f7da-3894e49c-fc0eeb66-9b500fe2/0.png" } ], "size": "202472" } ], "result": true } ``` ## Cancel Task - Make HTTP Post Request (For tasks on queue) ```bash curl -X POST "https://api.wiro.ai/v1/Task/Cancel" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "taskid": "634574" }'; ``` ## Cancel Task - Response ```json { "errors": [], "tasklist": [ { "id": "634574", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "name": "", "socketaccesstoken": "ZpYote30on42O4jjHXNiKmrWAZqbRE", "parameters": { "inputImage": "https://api.wiro.ai/v1/File/mCmUXgZLG1FNjjjwmbtPFr2LVJA112/inputImage-6060136.png" }, "debugoutput": "", "debugerror": "", "starttime": "1734513809", "endtime": "1734513813", "elapsedseconds": "6.0000", "status": "task_cancel", "cps": "0.000585000000", "totalcost": "0.003510000000", "guestid": null, "projectid": "699", "modelid": "598", "description": "", "basemodelid": "0", "runtype": "model", "modelfolderid": "", "modelfileid": "", "callbackurl": "", "marketplaceid": null, "createtime": "1734513807", "canceltime": "0", "assigntime": "1734513807", "accepttime": "1734513807", "preprocessstarttime": "1734513807", "preprocessendtime": "1734513807", "postprocessstarttime": "1734513813", "postprocessendtime": "1734513814", "pexit": "0", "categories": "["tool","image-to-image","quick-showcase","compare-landscape"]", "outputs": [ { "id": "6bc392c93856dfce3a7d1b4261e15af3", "name": "0.png", "contenttype": "image/png", "parentid": "6c1833f39da71e6175bf292b18779baf", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "size": "202472", "addedtime": "1734513812", "modifiedtime": "1734513812", "accesskey": "dFKlMApaSgMeHKsJyaDeKrefcHahUK", "foldercount": "0", "filecount": "0", "ispublic": 0, "expiretime": null, "url": "https://cdn1.wiro.ai/6a6af820-c5050aee-40bd7b83-a2e186c6-7f61f7da-3894e49c-fc0eeb66-9b500fe2/0.png" } ], "size": "202472" } ], "result": true } ``` ## Task Status Information This section defines the possible task status values returned by the API when polling for task completion. ### Completed Task Statuses (Polling can stop) These indicate that the task has reached a terminal state — either success or failure. Once any of these is received, polling should stop. - task_postprocess_end : Task completed successfully and post-processing is done. - task_cancel : Task was cancelled by the user or system. ### Running Task Statuses (Continue polling) These statuses indicate that the task is still in progress. Polling should continue if one of these is returned. - task_queue : Task is waiting in the queue. - task_accept : Task has been accepted for processing. - task_assign : Task is being assigned to a worker. - task_preprocess_start : Preprocessing is starting. - task_preprocess_end : Preprocessing is complete. - task_start : Task execution has started. - task_output : Output is being generated.