## Basic tool info Model name: alibaba/happyhorse 1.0 reference Model description: Edit a short MP4/MOV clip or generate a new 720p/1080p video from up to 9 reference images and a detailed prompt, with optional watermark and seed control. Model cover: https://cdn.wiro.ai/uploads/models/alibaba-happyhorse-1-0-reference-cover.mp4 Model categories: - tool - partner - alibaba - video-to-video - image-to-video - nogpu-pipeline Model tags: - video generator - alibaba Run Task Endpoint (POST): https://api.wiro.ai/v1/Run/alibaba/happyhorse-1-0-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 using an instruction and optional reference images. 'r2v' generates a new video from reference images only. 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: Required in videoedit mode. Single input video to edit. Format: MP4 or MOV (H.264). Duration: 3–60s (output capped at 15s; input >15s is trimmed by the API). Longer side ≤2160 px, shorter side ≥320 px, aspect 1:2.5–2.5:1, ≤100 MB. Ignored in r2v mode. type: combinefileinput default: - name: inputImage label: Reference Images help: videoedit: optional, 0–5 reference images. r2v: required, 1–9 reference images. Use 'character1', 'character2'… in the prompt to bind to images by order. Format: JPEG/JPG/PNG/WEBP, ≤10 MB. type: combinefileinput default: happyhorse-1-reference-sampleinput-1.jpeg,happyhorse-1-reference-sampleinput-2.jpeg - name: prompt label: prompt help: Required. Describes the desired edit (videoedit) or scene (r2v). Up to 5,000 non-Chinese characters or 2,500 Chinese characters. type: textarea default: The young woman is sitting on a wooden bench in a sunlit autumn park, holding a takeaway coffee cup. The golden retriever puppy trots up to her, tail wagging, and places its paws on her lap. She laughs softly, leans down, and gently scratches behind the puppy's ears. Warm golden hour light filters through orange leaves overhead, a gentle breeze drifts a few leaves through the frame. Cinematic 35mm shallow depth of field, naturalistic colors. - name: duration label: Duration help: r2v only. Output duration in seconds (3–15). Ignored in videoedit mode (output duration = min(input video duration, 15s)). 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: videoedit: ignored — ratio is inherited from the input video. r2v: 'auto' detects the closest ratio from the 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: videoedit only. 'auto' lets the model decide; 'origin' preserves the input video's audio. Ignored in r2v mode. type: select default: auto options: - value: "auto" label: auto (model decides) - value: "origin" label: origin (keep input audio) - name: watermark label: Watermark help: Optional. Adds a 'HappyHorse' 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: r2v - inputImage: https://cdn.wiro.ai/uploads/sampleinputs/happyhorse-1-reference-sampleinput-1.jpeg,https://cdn.wiro.ai/uploads/sampleinputs/happyhorse-1-reference-sampleinput-2.jpeg - prompt: The young woman is sitting on a wooden bench in a sunlit autumn park, holding a takeaway coffee cup. The golden retriever puppy trots up to her, tail wagging, and places its paws on her lap. She laughs softly, leans down, and gently scratches behind the puppy's ears. Warm golden hour light filters through orange leaves overhead, a gentle breeze drifts a few leaves through the frame. Cinematic 35mm shallow depth of field, naturalistic colors. - mode: r2v - inputImage: https://cdn.wiro.ai/uploads/sampleinputs/happyhorse-1-reference-sampleinput-3.jpeg,https://cdn.wiro.ai/uploads/sampleinputs/happyhorse-1-reference-sampleinput-4.jpeg - prompt: The elegant woman stands in a softly lit luxurious marble dressing room with floor-length sheer curtains gently swaying in a warm breeze. She gracefully picks up the golden perfume bottle from a marble vanity, lifts it close to her neck, and lightly sprays once. Fine mist drifts through the warm sunlight beams. She closes her eyes briefly, then opens them with a soft confident smile toward the camera. Cinematic luxury commercial aesthetic, slow elegant motion, golden warm grade, 35mm anamorphic. - mode: videoedit - inputVideo: https://cdn.wiro.ai/uploads/sampleinputs/happyhorse-1-reference-sampleinput-3.mp4 - inputImage: - prompt: Transform the scene into a warm summer festival evening. Replace the bright midday sky with a deep golden-hour sky fading into dusk. Crisscross strings of warm glowing string lights and small paper lanterns between the houses above the street. Light up the windows with warm yellow interior light. Add bursts of colorful fireworks rising over the sea in the background. Add a few softly motion-blurred locals dancing on the sides of the street. Keep the woman's identity, yellow sundress, straw hat, walking motion, and exact camera framing identical. Cinematic Italian summer evening look. - mode: videoedit - inputVideo: https://cdn.wiro.ai/uploads/sampleinputs/happyhorse-1-reference-sampleinput-4.mp4 - inputImage: - prompt: Transform the scene into a glamorous Hollywood movie premiere at night. Replace the daytime sky with a deep evening sky with klieg searchlight beams sweeping across it. Roll out a long red carpet down the center of the sidewalk where he is walking, lined with velvet ropes on both sides. Add a dense crowd of paparazzi photographers with bright camera flashes constantly popping on the left side, and an excited cheering crowd of fans behind the velvet ropes on the right side, slightly motion-blurred. Light up the theater marquee in the background with bright glowing white bulbs and a movie title. Add subtle haze and warm spotlight beams crossing through the air. Keep the man's identity, navy suit, walking motion, and exact camera framing identical. Cinematic premiere-night look. ## 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/happyhorse-1-0-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": "", "inputImage": [ "happyhorse-1-reference-sampleinput-1.jpeg", "happyhorse-1-reference-sampleinput-2.jpeg" ], "prompt": "The young woman is sitting on a wooden bench in a sunlit autumn park, holding a takeaway coffee cup. The golden retriever puppy trots up to her, tail wagging, and places its paws on her lap. She laughs softly, leans down, and gently scratches behind the puppy's ears. Warm golden hour light filters through orange leaves overhead, a gentle breeze drifts a few leaves through the frame. Cinematic 35mm shallow depth of field, naturalistic colors.", "duration": 5, "resolution": "720P", "ratio": "auto", "audioSetting": "auto", "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.