## Basic tool info Model name: alibaba/Wan 2.7 Reference Model description: Generate 2-10s videos in 720p or 1080p from reference images or a short clip. Wan 2.7 R2V keeps subject identity while following your prompt. Model cover: https://cdn.wiro.ai/uploads/models/alibaba-wan-2-7-reference-cover.mp4 Model categories: - tool - partner - image-to-video - alibaba - video-to-video - nogpu-pipeline Model tags: - video generator - alibaba Run Task Endpoint (POST): https://api.wiro.ai/v1/Run/alibaba/wan-2-7-reference Get Task Detail Endpoint (POST): https://api.wiro.ai/v1/Task/Detail ## Model Inputs: - name: mode label: Mode help: Required. 'videoedit' edits an input video. 'r2v' generates a video from reference videos and/or reference images. type: select default: videoedit options: - value: "videoedit" label: videoedit (edit an input video) - value: "r2v" label: r2v (reference-to-video) - name: inputVideo label: Video help: In videoedit mode: required, single input video to edit. In r2v mode: optional, up to 5 reference videos. Max 100 MB each. type: combinefileinput default: alibaba-wan-2-7-r2v-input-1.mp4 - name: inputImage label: Reference Images help: Optional in videoedit (up to 4). In r2v: required if no input video is provided; total references + reference videos cannot exceed 5. type: combinefileinput default: - name: inputAudio label: Reference Voices help: Optional, r2v only. Voice samples mapped 1:1 (by order) to reference videos then reference images. Ignored in videoedit mode. type: combinefileinput default: - name: prompt label: prompt help: Required. Describes the elements and visual characteristics for the generated video. Up to 5,000 characters. type: textarea default: A woman seen from behind with long dark hair blowing in the wind, wearing a long white dress and wrapped tightly in a thick olive-green blanket, standing on the edge of a dark, charred cliff. Below her, a vast, bubbling sea of glowing red and orange lava stretches to the horizon. A hellish atmosphere with a dark, ominous sky choked with thick black smoke and falling grey ash. The fiery glow of the magma illuminates her from below, intense heat distortion in the air. - name: negativePrompt label: Negative Prompt help: Optional. Specify what to exclude from the output. Up to 500 characters. type: textarea default: - name: duration label: Duration help: Required. Output duration in seconds. videoedit: 2–10. r2v with input video: 2–10. r2v without input video: 2–15. type: number default: 5 - name: resolution label: Resolution help: Required. Resolution tier for the generated video. type: select default: 720P options: - value: "720P" label: 720P - value: "1080P" label: 1080P - name: ratio label: Ratio help: Optional. In videoedit mode, ratio is inherited from the input video. In r2v mode, 'auto' detects the ratio from the first reference video (fallback: first reference image). type: select default: auto options: - value: "auto" label: auto - value: "16:9" label: 16:9 - value: "9:16" label: 9:16 - value: "1:1" label: 1:1 - value: "4:3" label: 4:3 - value: "3:4" label: 3:4 - name: audioSetting label: Audio Setting help: Optional, videoedit only. 'auto' generates a new audio track; 'origin' preserves the input video's audio. Ignored in r2v mode. type: select default: auto options: - value: "auto" label: auto (generate) - value: "origin" label: origin (keep input) - name: promptExtend label: Prompt Extend help: Optional. When enabled, an LLM rewrites the prompt. Improves quality for short prompts but increases processing time. type: select default: false options: - value: "false" label: false - value: "true" label: true - name: watermark label: Watermark help: Optional. Add 'AI Generated' watermark in the lower-right corner. type: select default: false options: - value: "false" label: false - value: "true" label: true - name: seed label: Seed help: Optional. Random seed for reproducibility (0-2147483647). type: number default: ## Model Parameter Inspires: - mode: videoedit - inputVideo: https://cdn.wiro.ai/uploads/sampleinputs/alibaba-wan-2-7-r2v-input-1.mp4 - inputImage: - prompt: A woman seen from behind with long dark hair blowing in the wind, wearing a long white dress and wrapped tightly in a thick olive-green blanket, standing on the edge of a dark, charred cliff. Below her, a vast, bubbling sea of glowing red and orange lava stretches to the horizon. A hellish atmosphere with a dark, ominous sky choked with thick black smoke and falling grey ash. The fiery glow of the magma illuminates her from below, intense heat distortion in the air. - mode: videoedit - inputVideo: https://cdn.wiro.ai/uploads/sampleinputs/alibaba-wan-2-7-r2v-input-2.mp4 - inputImage: - prompt: An aerial drone shot flies forward, following a winding asphalt road with double yellow lines as it recedes deep into a canyon. The previously rocky, sparse mountainsides are now a dense, lush, vibrant green forest. Towering slopes are completely covered in varied green trees—conifers, oaks, and dense undergrowth—creating a rich, verdant tapestry. The canyon is now entirely filled with thriving green vegetation. The winding road cuts a clear path through the sea of green. Clear, bright daylight illuminates the vibrant colors of the forest. The perspective is maintained as the camera moves over the road, into the heart of the lush green mountain pass. - mode: r2v - inputVideo: https://cdn.wiro.ai/uploads/sampleinputs/alibaba-wan-2-7-r2v-input-3-1.mp4 - inputImage: https://cdn.wiro.ai/uploads/sampleinputs/alibaba-wan-2-7-r2v-input-3-2.jpg,https://cdn.wiro.ai/uploads/sampleinputs/alibaba-wan-2-7-r2v-input-3-3.jpg - prompt: Insert the astronaut from image 1 and the Earth from image 2 into the provided starfield video. Place the astronaut in the lower-left foreground and the Earth in the upper-right background. Animate the astronaut with a very subtle, slow-motion floating effect while the background stars continue their timelapse movement. Ensure the lighting on the astronaut and Earth is consistent with a distant sun. - mode: r2v - inputVideo: https://cdn.wiro.ai/uploads/sampleinputs/alibaba-wan-2-7-r2v-input-4-1.mp4 - inputImage: https://cdn.wiro.ai/uploads/sampleinputs/alibaba-wan-2-7-r2v-input-4-2.jpg - prompt: Three lions from the reference image, including a majestic male with a dark mane and a white male lion, standing in the shallow waters of a fast-flowing, wide river. The river water rushes around their legs. The background is a dense, lush green tropical forest with palm trees under a bright, sunny sky. Realistic sunlight reflecting off the water and the lions\' fur. ## 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}")"; ``` ## Run Command - Make HTTP Post Request ```bash curl -X POST "https://api.wiro.ai/v1/Run/alibaba/wan-2-7-reference" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "mode": "videoedit", "inputVideo": "alibaba-wan-2-7-r2v-input-1.mp4", "inputImage": "", "inputAudio": "", "prompt": "A woman seen from behind with long dark hair blowing in the wind, wearing a long white dress and wrapped tightly in a thick olive-green blanket, standing on the edge of a dark, charred cliff. Below her, a vast, bubbling sea of glowing red and orange lava stretches to the horizon. A hellish atmosphere with a dark, ominous sky choked with thick black smoke and falling grey ash. The fiery glow of the magma illuminates her from below, intense heat distortion in the air.", "negativePrompt": "", "duration": 5, "resolution": "720P", "ratio": "auto", "audioSetting": "auto", "promptExtend": "false", "watermark": "false", "seed": null, "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", "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 } ``` ## 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.