Restore this archival greenhouse footage to match @Image1: repair the broken glass panes, clear the overgrowth, and let morning sunlight fill the structure while keeping the original camera move, no text, no logos, no watermark, no promotional marks
Happy Horse 1.0 Video Edit API
alibaba/happyhorse-1.0/video-editHappy Horse 1.0 Video Edit transforms existing source footage through natural-language prompts and optional reference images, supporting 3–60s input video, 720p or 1080p output, and flexible audio modes. It faithfully inherits underlying motion topology and camera trajectory while accurately rendering targeted wardrobe, material, and stylistic restyling.
Drag and drop files, paste from clipboard, or provide a URL.
Drag and drop files, paste from clipboard, or provide a URL.
Your generated video will appear here
Add your prompt and required media, review the settings, then click Run.
Examples
REST API
Quick Start
Authenticate via API Key, submit source video and editing instructions, and retrieve video via task ID.
Connect to Vidgo API
Create an API Key, store it securely on your server, and set Authorization: Bearer VIDGO_API_KEY.
- Endpoint
- POST
https://api.vidgo.ai/api/generate/submit - Authentication
- Authorization: Bearer VIDGO_API_KEY
Submit a Video Edit Task
Pass source video in video_url, describe modifications in prompt, and set model to alibaba/happyhorse-1.0/video-edit.
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/happyhorse-1.0/video-edit",
"input": {
"prompt": "Restore this archival greenhouse footage to match @Image1: repair the broken glass panes, clear the overgrowth, and let morning sunlight fill the structure while keeping the original camera move, no text, no logos, no watermark, no promotional marks",
"resolution": "1080p",
"audio_setting": "auto",
"video_url": "https://cdn.vidgo.ai/apis/models/alibaba/happyhorse-1.0/video-edit/v1/01/input-source.mp4",
"reference_image_urls": [
"https://cdn.vidgo.ai/apis/models/alibaba/happyhorse-1.0/video-edit/v1/01/input-01.png"
]
}
}
JSON
)
RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
CODE=$(printf '%s' "$RESPONSE" | jq -r '.code // empty')
if [ "$CODE" != "0" ] && [ "$CODE" != "200" ]; then
printf 'API error: %s
' "$RESPONSE" >&2
exit 1
fi
printf '%s
' "$RESPONSE"Await Results
Poll with task_id while status is not_started or running. Stop at finished or failed; read data.files[].file_url on success or data.error_message on failure.
Track Status
GET https://api.vidgo.ai/api/generate/status/{task_id}Poll every 2 seconds, backing off for extended jobs. Continue only while not_started or running. Alternatively provide callback_url.
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "task-unified-...",
"status": "running",
"created_time": "2026-09-17T10:00:00Z"
}
}{
"code": 200,
"data": {
"task_id": "task-unified-...",
"status": "finished",
"files": [
{
"file_url": "https://storage.vidgo.ai/generated/video.mp4",
"file_type": "video"
}
],
"created_time": "2026-08-22T10:00:00Z",
"progress": 100,
"error_message": null
}
}Complete Runnable Example
Expand to inspect complete code including status checks, task_id validation, polling, and timeout boundaries.
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/happyhorse-1.0/video-edit",
"input": {
"prompt": "Restore this archival greenhouse footage to match @Image1: repair the broken glass panes, clear the overgrowth, and let morning sunlight fill the structure while keeping the original camera move, no text, no logos, no watermark, no promotional marks",
"resolution": "1080p",
"audio_setting": "auto",
"video_url": "https://cdn.vidgo.ai/apis/models/alibaba/happyhorse-1.0/video-edit/v1/01/input-source.mp4",
"reference_image_urls": [
"https://cdn.vidgo.ai/apis/models/alibaba/happyhorse-1.0/video-edit/v1/01/input-01.png"
]
}
}
JSON
)
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
TASK_ID=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.data.task_id // .task_id // empty')
BUSINESS_CODE=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Submit failed:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
START_TIME=$(date +%s)
POLL_DELAY=2
while true; do
if [ $(( $(date +%s) - START_TIME )) -ge 600 ]; then
printf 'Timed out after 600 seconds
' >&2
exit 1
fi
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/$TASK_ID" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
BUSINESS_CODE=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Status request failed:
%s
' "$STATUS_RESPONSE" >&2
exit 1
fi
case "$STATUS" in
finished)
printf '%s' "$STATUS_RESPONSE" | jq -r '(.data.files // .files // [])[]?.file_url'
break
;;
failed)
printf '%s' "$STATUS_RESPONSE" | jq -r '.data.error_message // .error_message // "Generation failed"' >&2
exit 1
;;
not_started|running)
sleep "$POLL_DELAY"
if [ "$POLL_DELAY" -lt 10 ]; then POLL_DELAY=$((POLL_DELAY + 1)); fi
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
doneInput Parameters
Available request parameters, data types, and default values. The top-level model field is also required.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| video_url | string | Yes | — | String. Publicly accessible source video URL. Supports 3–60 seconds duration. |
| prompt | string | Yes | — | Required, nonblank, and at most 2,500 characters. Describe the edits, optionally with reference images. |
| reference_image_urls | array | No | — | String array. Up to 5 reference image URLs, described in the prompt using natural language. |
| resolution | string | No | 1080p | String. Output resolution. Supports 720p and 1080p. |
| audio_setting | string | No | auto | String. Audio policy: auto (regenerates audio) or origin (preserves source audio). |
| seed | integer | No | — | Integer. 0 to 2147483647 for reproducible generation foundations. |
| enable_safety_checker | boolean | No | — | Boolean. Enables content safety moderation for inputs and outputs. |
Response Fields
Task submission returns a task_id; status queries yield lifecycle progress and video assets.
| Field | Type | Description |
|---|---|---|
| code | integer | Business response code, 200 on success. |
| data.task_id | string | Unique task identifier used to track and poll progress. |
| data.status | string | Lifecycle state: not_started, running, finished, or failed. |
| data.progress | integer | Generation completion percentage (0–100). |
| data.files[].file_url | string | Public URL of the generated video asset. |
| data.files[].file_type | string | File type string, e.g., video. |
| data.error_message | string | null | Failure details when status equals failed. |
Task Lifecycle
Continue polling while in not_started or running. Conclude when finished or failed is reached.
not_startedTask is accepted in the queue and awaiting execution.
runningGeneration is actively in progress. Continue polling.
finishedTask completed successfully. Read video from data.files[].file_url.
failedGeneration failed. Read data.error_message and stop polling.
Polling & Error Handling
- AuthenticationIf HTTP 401 is returned, verify the Bearer API key in the Authorization header.
- ValidationIf HTTP 400 is returned, verify required parameters, valid value ranges, and available credits.
- Network & TimeoutIf status polling encounters a network timeout, retain the task_id and retry the query.
- Polling FrequencyPoll every 2 seconds initially, gradually backing off for longer generations.
- Terminal StatesOnly continue polling on not_started or running. Halt on finished or failed.
- Callback SupportProvide callback_url in the request payload to receive final task payloads via webhook.
Endpoint Specifications
| Specification | Value | Details |
|---|---|---|
| Input Mode | Source Video + Prompt (+ Optional Images) | Supply source video, text prompt, and up to 5 optional reference images. |
| Source Video Duration | 3 to 60 seconds | Source videos support 3–60 seconds. Credits equal min(detected seconds, 15) × the resolution rate, normalized to six decimal places. |
| Reference Image Syntax | Natural-language references | Cited in prompt corresponding to reference_image_urls array. |
| Audio Policy | auto / origin | auto regenerates audio, origin preserves original source soundtrack. |
| Output Format | MP4 Video | Asynchronous response returns task_id; final result provides downloadable video URL. |
| Resolution | 720p / 1080p | Default preselected to 1080p. |
| Billing | Per-second rate (15s Cap) | 720p at 32 credits/s, 1080p at 64 credits/s. |
Related Models
Happy Horse 1.0 Video Edit API Frequently Asked Questions
What is the Happy Horse 1.0 Video Edit API?
Happy Horse 1.0 Video Edit is an Alibaba model for video-to-video editing and restyling. It transforms 3–60s source footage using natural-language instructions and up to 5 optional reference images into 720p or 1080p re-rendered video, featuring exceptional motion fidelity, local element substitution, and global style transfer. Built on an advanced spatiotemporal video restyling architecture, it strictly adheres to source motion skeletons and camera momentum while rendering desired wardrobe, weather, and stylistic changes, with audio passthrough support. You can call it programmatically or try it from the playground above.
What source video duration does Happy Horse 1.0 Video Edit support?
Source videos support 3–60 seconds. Credits equal min(detected seconds, 15) × the resolution rate, normalized to six decimal places.
How do you reference images in Happy Horse 1.0 Video Edit prompts?
Include up to 5 image URLs in reference_image_urls and describe the intended reference features in prompt. This guides the model to transfer specific textures, patterns, or character appearances directly into the video.
Can Happy Horse 1.0 Video Edit preserve original audio?
Yes. Set audio_setting to origin to pass through the original voice dialogue, ambient sound, and background music from the source. Setting it to auto directs the model to synthesize a fresh soundtrack aligned with the restyled visual.
How does the billing cap work for Happy Horse 1.0 Video Edit?
For any video longer than 15 seconds (such as 25s or 50s clips), billing is strictly capped at 15 seconds (480 credits for 720p, 960 credits for 1080p). You will never be charged for duration exceeding 15 seconds.
Does Happy Horse 1.0 Video Edit alter underlying motion dynamics?
The model uses the source motion, actor pacing, and camera trajectory as references, with edits focused on surface textures, styles, and visual assets.
When should you choose Happy Horse 1.0 Video Edit over Reference to Video?
Choose Video Edit when you have an existing video track and want to inherit its exact pacing, blocking, and choreography while altering the aesthetic style or wardrobe. If you are generating a new shot from scratch using still images, use Reference to Video.















