Generate 1080p video with synchronized native audio from a text prompt and references. Aspect ratios: 16:9, 9:16, 1:1, 4:3, 3:4. Duration: 3–15s.
Install
pip install requestsRun the model
import requests
response = requests.post(
"https://api.runflow.io/v1/run/happy-horse/reference-to-video",
headers={"Authorization": "Bearer RUNFLOW_API_KEY"},
json={
"prompt": "character1 walks confidently down a neon-lit Tokyo street at night, cinematic...",
"duration": 5,
"image_urls": [
"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=1024&q=80"
],
"resolution": "720p",
"aspect_ratio": "16:9"
},
)
data = response.json()
print(data["video"]["url"])Input schema
| Parameter | Type | Description |
|---|---|---|
| prompt | string | Text prompt describing the desired video. Reference subjects from your images using ``character1``, ``character2``, ... up to ``character9`` (the order matches the order of ``image_urls``). Max 2500 characters. |
| image_urls | image_list | Reference images for subject consistency (1-9 images). Formats: JPEG, JPG, PNG, WEBP. Shortest side must be at least 400 px (720P or higher recommended). Max 10 MB each. |
| aspect_ratio | string | Aspect ratio of the generated video. |
| duration | integer | Output video duration in seconds (3-15). |
| enable_safety_checker | boolean | Enable content moderation for input and output. |
| resolution | string | Output video resolution tier. |
| seed | integer | Random seed for reproducibility (0-2147483647). |
Output schema
| Field | Type | Description |
|---|---|---|
| outputs | json | Unified output array — one entry per generated artifact with url/type/width/height/duration/etc. |
| seed | json | Deterministic seed used for generation, or null if the provider doesn't return one. |
| timing | json | Provider timing info (inference_ms etc.), or null. |
| nsfw_detected | json | true if the provider flagged output as NSFW, false if cleared, null if not checked. |
Related models
Happy Horse Text-to-Video
alibaba/happy-horse/text-to-video
Generate 1080p video with synchronized native audio from a text prompt. Aspect r...
Happy Horse Image-to-Video
alibaba/happy-horse/image-to-video
Alibaba's #1-ranked Happy Horse 1.0 — generate 1080p video with synchronized nat...
Happy Horse Video Edit
alibaba/happy-horse/video-edit
HappyHorse video editing supports advanced video editing through natural languag...
Wan 2.7 — Image to Video
alibaba/wan/v2.7/image-to-video
Wan 2.7 delivers enhanced motion smoothness, superior scene fidelity, and greate...
Start generating with Happy Horse Reference-to-Video
Get API access in minutes. No GPU setup, no infrastructure to manage.