Bind [image_1] to the little handmade felt explorer and [image_2] to the explorer’s exact copper lantern. A three-second continuous side-tracking shot inside a dark miniature cave with softly glowing pale-green fungi. The explorer takes two slow steps while holding the lantern by its handle; its amber light brushes the felt face and stone wall. Preserve the teal coat, round tan felt face, ochre cap, and the lantern’s hexagonal copper cage and blue glass star. Tactile stop-motion craftsmanship, steady coherent anatomy and prop shape, soft felt footsteps and tiny metal-handle creak, no dialogue or music. No logos, brands, advertising, captions, subtitles or watermarks.
Happy Horse 1.1 Reference to Video API
alibaba/happyhorse-1.1/reference-to-videoHappy Horse 1.1 Reference to Video turns 1 to 9 reference images and a guiding text prompt into a 3–15 second cinematic video clip at 720p or 1080p, with multi-subject identity consistency, native synchronized audio, and multilingual lip-sync across seven languages. It preserves distinct character features, wardrobe designs, and object silhouettes across scene changes without identity drift.
Add 1–9 reference images.
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 reference image assets alongside character tokens, 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 Reference to Video Task
Set reference_image_urls and describe the subjects and actions in prompt; character markers are optional.
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/happyhorse-1.1/reference-to-video",
"input": {
"prompt": "Use [image_1] for the older woman and [image_2] for the younger man, keeping their separate faces and clothing exactly recognizable. One continuous medium two-shot inside a quiet mountaintop observatory beside a telescope, both uncovered faces readable. During seconds 0-2 the older woman on the left asks exactly in English, \"Found it?\" During seconds 2-5 the younger man on the right answers exactly, \"There it is.\", and points toward the telescope eyepiece. Only the speaking person moves their lips. Subtle camera drift, accurate dialogue lip-sync, restrained gestures, quiet room tone and a faint telescope motor, no music. No logos, brands, advertising, captions, subtitles or watermarks.",
"duration": 5,
"resolution": "1080p",
"seed": 11201,
"aspect_ratio": "16:9",
"reference_image_urls": [
"https://cdn.vidgo.ai/apis/models/alibaba/happyhorse-1.1/reference-to-video/v1/01/input-01.png",
"https://cdn.vidgo.ai/apis/models/alibaba/happyhorse-1.1/reference-to-video/v1/01/input-02.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": "2ZW2ZK57CMZC1EK2",
"status": "running",
"created_time": "2026-09-21T17:18:09"
}
}{
"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.1/reference-to-video",
"input": {
"prompt": "Use [image_1] for the older woman and [image_2] for the younger man, keeping their separate faces and clothing exactly recognizable. One continuous medium two-shot inside a quiet mountaintop observatory beside a telescope, both uncovered faces readable. During seconds 0-2 the older woman on the left asks exactly in English, \"Found it?\" During seconds 2-5 the younger man on the right answers exactly, \"There it is.\", and points toward the telescope eyepiece. Only the speaking person moves their lips. Subtle camera drift, accurate dialogue lip-sync, restrained gestures, quiet room tone and a faint telescope motor, no music. No logos, brands, advertising, captions, subtitles or watermarks.",
"duration": 5,
"resolution": "1080p",
"seed": 11201,
"aspect_ratio": "16:9",
"reference_image_urls": [
"https://cdn.vidgo.ai/apis/models/alibaba/happyhorse-1.1/reference-to-video/v1/01/input-01.png",
"https://cdn.vidgo.ai/apis/models/alibaba/happyhorse-1.1/reference-to-video/v1/01/input-02.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 |
|---|---|---|---|---|
| prompt | string | Yes | — | Up to 2500 Unicode characters after trimming surrounding whitespace. A nonblank prompt is required. |
| reference_image_urls | string[] | Yes | — | One to nine ordered reference images: public HTTP(S) URLs, image Data URIs, or raw Base64. |
| resolution | string | No | 1080p | 720p or 1080p. Default: 1080p. |
| duration | integer | No | 5 | Integer from 3 to 15 seconds. Default: 5. |
| aspect_ratio | string | No | 16:9 | Supported values: 21:9, 16:9, 4:3, 1:1, 3:4, 4:5, 5:4, 9:16, 9:21. Default: 16:9. |
| seed | integer | No | — | Optional integer from 0 to 2147483647. Omitted when not specified. |
| enable_safety_checker | boolean | No | — | Optional boolean. Omitted when not specified. |
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 |
|---|---|---|
| prompt | 2500 | Up to 2500 Unicode characters after trimming surrounding whitespace. A nonblank prompt is required. |
| reference_image_urls | 1–9 | One to nine ordered reference images: public HTTP(S) URLs, image Data URIs, or raw Base64. |
| resolution | 1080p | 720p or 1080p. Default: 1080p. |
| duration | 5 | Integer from 3 to 15 seconds. Default: 5. |
| aspect_ratio | 16:9 | Supported values: 21:9, 16:9, 4:3, 1:1, 3:4, 4:5, 5:4, 9:16, 9:21. Default: 16:9. |
Happy Horse 1.1 Reference to Video
Happy Horse 1.1 Reference to Video solves identity drift across multi-shot narratives and complex scene staging. Submit 1 to 9 reference images representing one or more characters, garments, props, or background environments via public URLs, Data URIs, or Base64. A required prompt of up to 2,500 characters directs actions, dialogue, interactions, and camera choreography while preserving identity, rendering synchronized sound, and framing into your choice of 9 aspect ratios.
Key Capabilities & Advantages
Multi-image reference conditioning (1–9 images)Accepts 1 to 9 reference images to define multiple camera angles, costumes, distinct characters, or key props within a single generation task.
Multi-character identity anchoringMaintains separate visual identities for multiple characters across interaction scenes, preventing facial swapping or blending.
Flexible prompt-based character bindingBinds reference images either naturally through detailed descriptive prompts or explicitly using bracketed tokens like [image_1] and [image_2].
Native synchronized dialogue and FoleySynthesizes vocal lines with accurate lip movements and environment Foley simultaneously without third-party audio pipelines.
Multi-angle visual groundingCombines front, side, and three-quarter view reference photos to construct consistent 3D volume through complex camera orbits.
Nine native aspect ratio framingsProvides full flexibility with 9 supported aspect ratios including 16:9, 9:16, 21:9, and 1:1, independent of reference image dimensions.
Parameters
| Parameter | Requirement | Description |
|---|---|---|
| prompt | Required | Up to 2500 Unicode characters after trimming surrounding whitespace. A nonblank prompt is required. |
| reference_image_urls | Required | One to nine ordered reference images: public HTTP(S) URLs, image Data URIs, or raw Base64. |
| resolution | Optional | 720p or 1080p. Default: 1080p. Default 1080p |
| duration | Optional | Integer from 3 to 15 seconds. Default: 5. Default 5 |
| aspect_ratio | Optional | Supported values: 21:9, 16:9, 4:3, 1:1, 3:4, 4:5, 5:4, 9:16, 9:21. Default: 16:9. Default 16:9 |
| seed | Optional | Optional integer from 0 to 2147483647. Omitted when not specified. |
| enable_safety_checker | Optional | Optional boolean. Omitted when not specified. |
How to Call Happy Horse 1.1 Reference to Video API
Prepare 1–9 reference imagesCollect clear reference images of your subjects, props, or costumes with distinct details.
Pass ordered reference arrayProvide the image URLs or data strings inside the reference_image_urls parameter array.
Draft direction promptWrite a required prompt (up to 2,500 chars) detailing scene events, speaker dialogue, and character interactions.
Select duration, resolution, and ratioChoose 3 to 15 seconds, pick 720p or 1080p, and select your preferred framing from 9 aspect ratios.
Trigger asynchronous generationSubmit your payload to the unified endpoint or trigger via the interactive playground.
Download the consistent videoQuery progress with task_id until finished, then access the rendered video via data.files[].file_url.
Pricing
Cost = output seconds × resolution rate. 1 credit = $0.005; all three modes use the same rates. Failed tasks are refunded automatically.
| Usage | Rate | Details |
|---|---|---|
| 720p | 22 credits/s ($0.11/s) | 5 seconds: 110 credits ($0.55) |
| 1080p | 28 credits/s ($0.14/s) | 5 seconds: 140 credits ($0.70) |
Best Use Cases
Multi-scene episodic video and web dramaKeep recurring actors and signature costumes looking identical across consecutive shots, dialogue scenes, and action sequences.
Multi-character dialogue scenesSupply separate reference portraits for two or more characters having a conversation with alternating dialogue and synchronized lip motion.
Consistent commercial brand assetsFeature proprietary mascots, corporate ambassadors, or packaged goods across diverse seasonal advertising campaigns.
Virtual fashion and product lookbooksShowcase garments and accessories on consistent models under varying lighting conditions, movement dynamics, and settings.
Pro Tips
- When directing two characters, supply portrait photos for each and use explicit references in your prompt (e.g. 'The woman in blue [image_1] speaks in English, while the man in jacket [image_2] listens attentively') to avoid identity mix-ups.
- Providing multiple angles of the same character (front, profile, three-quarter) allows the model to render smooth 360-degree orbit cameras without feature deformation.
- Ensure reference images are well-illuminated and sharp; avoid heavy compression or extreme lens distortion for optimal fidelity.
- Unlike Image to Video which inherits the first frame's ratio, Reference to Video requires an explicit aspect_ratio choice; select the format that matches your distribution channel.
Usage Notes
- reference_image_urls accepts between 1 and 9 image URLs; providing an empty array causes task rejection before deduction.
- A nonblank prompt is required (up to 2,500 characters) to define the action and role of the references in the scene.
- Aspect ratio is configurable (defaults to 16:9); choose from 9 native ratios regardless of reference image dimensions.
- Generates embedded audio with character speech, Foley, and music in the final MP4 file.
Related Models
Happy Horse 1.1 Reference to Video API frequently asked questions
What is the Happy Horse 1.1 Reference to Video API?
Happy Horse 1.1 Reference to Video is an Alibaba model for multi-reference video generation. It turns 1 to 9 reference images and a guiding text prompt into 3–15 second cinematic video clips at 720p or 1080p with multi-subject identity consistency, native synchronized audio, and multilingual lip-sync across seven languages. Built on Alibaba's unified single-stream self-attention Transformer architecture, it preserves distinct character features, wardrobe designs, and object silhouettes across scene changes without identity drift. You can call it programmatically or try it from the playground above.
How many reference images can I submit to Happy Horse 1.1 Reference to Video?
You can provide between 1 and 9 reference images in the reference_image_urls array. Use multiple images to supply different camera angles of one character, or provide distinct portraits for multiple interacting characters.
How do I reference specific images in Happy Horse 1.1 Reference to Video prompts?
You can refer to characters naturally by their visual attributes, or use explicit positional tags like [image_1] and [image_2] matching the order in reference_image_urls (for example, '[image_1] hands the package to [image_2]').
Can Happy Horse 1.1 Reference to Video animate multiple characters at once?
Yes. By providing distinct reference images for each character and specifying their respective actions and dialogue in the prompt, the model maintains separate appearances and synchronized lip motion for each speaker.
Is a text prompt required for Happy Horse 1.1 Reference to Video?
Yes. Unlike Image to Video which can run autonomously without text, Reference to Video requires a nonblank prompt (up to 2,500 characters) to instruct the model on how the referenced subjects should behave and interact.
Which aspect ratios are supported in Happy Horse 1.1 Reference to Video?
The endpoint supports 9 native aspect ratios: 21:9, 16:9, 4:3, 1:1, 3:4, 4:5, 5:4, 9:16, and 9:21. You must select your target ratio in the aspect_ratio parameter.
Does Happy Horse 1.1 Reference to Video support native lip-sync with multiple references?
Yes. Character dialogue included in quotation marks within your prompt is synthesized into natural vocal delivery and synchronized mouth shapes across any of the 7 supported languages.
How are credits billed for Happy Horse 1.1 Reference to Video?
Billing follows the standard rate based on generated video duration and resolution: 22 credits per second for 720p, and 28 credits per second for 1080p. The number of reference images submitted does not incur additional per-image charges.















