HappyHorse Video Generation
Call the Alibaba Cloud Bailian (DashScope) HappyHorse models through TENSORAXIS — text-to-video, image-to-video, reference-to-video, and video editing, plus parameters and billing.
HappyHorse is the TENSORAXIS integration of the Alibaba Cloud Bailian (DashScope) video models (channel HappyHorse). It is an asynchronous task: submit a task to get a task_id, poll the task status, then read the video URL after completion. The shared submit/poll flow lives in the Video Generation overview; this page covers only HappyHorse's four capabilities and parameters.
The four capabilities are distinguished by the model name suffix:
| Capability | Models | Description |
|---|---|---|
| Text-to-video (t2v) | happyhorse-1.1-t2v, happyhorse-1.0-t2v | Generate from a prompt only |
| Image-to-video (i2v) | happyhorse-1.1-i2v, happyhorse-1.0-i2v | Generate from one first-frame image |
| Reference-to-video (r2v) | happyhorse-1.1-r2v, happyhorse-1.0-r2v | Generate from multiple reference images |
| Video editing (video-edit) | happyhorse-1.0-video-edit | Edit from one source video + reference images |
Request Fields
POST /v1/video/generations
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | HappyHorse model name (see table above) |
prompt | string | Yes | Video prompt; empty returns 400 prompt is required |
metadata.media | array | Per capability | Media input array; each item has type and url; type is first_frame / reference_image / video |
images | string[] | Per capability | Reference image URLs (for r2v); treated as reference images when metadata.media is absent |
image | string | Per capability | Single image URL (first frame for i2v) |
input_reference | string | Per capability | Input reference URL (compat entry for i2v first frame / r2v reference image) |
metadata | object | No | Resolution, duration, aspect ratio, etc. — see Parameters |
Prefer passing media through metadata.media, tagging each item's purpose with type. images / image / input_reference are compatibility entries: when metadata.media is absent, i2v takes input_reference/image as the first frame, and r2v takes images/input_reference as reference images. The source video for video editing must be passed via metadata.media (type: video).
Text-to-Video (-t2v)
Needs only prompt; no media input is accepted.
curl https://api.tensoraxis.com/v1/video/generations \
-H "Authorization: Bearer $TENSORAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "happyhorse-1.1-t2v",
"prompt": "A lake at the foot of a snowy mountain reflects the sunset; the camera slowly pushes in",
"metadata": {
"resolution": "1080P",
"ratio": "16:9",
"duration": 5
}
}'Image-to-Video (-i2v)
Exactly one first-frame image. Pass it via metadata.media (type: first_frame), or use the compatibility entries input_reference / image. ratio is not accepted (the aspect ratio is determined by the first frame).
curl https://api.tensoraxis.com/v1/video/generations \
-H "Authorization: Bearer $TENSORAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "happyhorse-1.1-i2v",
"prompt": "The subject slowly looks up and smiles",
"metadata": {
"resolution": "1080P",
"duration": 5,
"media": [
{ "type": "first_frame", "url": "https://example.com/first-frame.jpg" }
]
}
}'Reference-to-Video (-r2v)
Generate from multiple reference images. The gateway accepts 1–9 reference images (reference_image items in metadata.media, or top-level images); the upstream recommends ≤5, and anything beyond is subject to the upstream response.
curl https://api.tensoraxis.com/v1/video/generations \
-H "Authorization: Bearer $TENSORAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "happyhorse-1.1-r2v",
"prompt": "Have these characters interact in the same scene",
"images": [
"https://example.com/ref-1.jpg",
"https://example.com/ref-2.jpg"
],
"metadata": {
"resolution": "1080P",
"ratio": "16:9",
"duration": 5
}
}'Video Editing (-video-edit)
Edit from one source video. You must pass exactly one type: video source video via metadata.media; you may add reference images (type: reference_image, ≤5 at the gateway, ≤4 upstream).
durationis not accepted: the output keeps the source video's length, so no duration parameter is sent.- Supports
audio_setting(this capability only):auto(default) /origin.
curl https://api.tensoraxis.com/v1/video/generations \
-H "Authorization: Bearer $TENSORAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "happyhorse-1.0-video-edit",
"prompt": "Replace the background with a dusk city skyline",
"metadata": {
"resolution": "1080P",
"audio_setting": "origin",
"media": [
{ "type": "video", "url": "https://example.com/source.mp4" },
{ "type": "reference_image", "url": "https://example.com/style.jpg" }
]
}
}'Parameters
Parameters under metadata map to upstream DashScope request fields. "Gateway value" is the value this site actually validates/clamps; "Notes" are for reference and are ultimately defined by the upstream response.
| Parameter | Type | Applies to | Gateway value / Default | Notes |
|---|---|---|---|---|
resolution | string | All | 720P / 1080P, default 1080P | Unrecognized values fall back to 1080P |
ratio | string | t2v / r2v only | 16:9 / 9:16 / 1:1 / 4:3 / 3:4; upstream defaults to 16:9 when omitted | Not accepted by i2v / video-edit |
duration | integer | t2v / i2v / r2v | Clamped to [3,15], default 5 | Not accepted by video-edit (output keeps source length) |
seed | integer | All | [0, 2147483647] | Fix randomness; an explicit 0 is preserved and sent |
watermark | boolean | All | Default false (sent explicitly) | Whether to add a watermark |
audio_setting | string | video-edit only | auto (default) / origin | Audio handling |
The official duration range varies by scenario (text-to-video about [2,15], with-video about [2,10]), but the gateway uniformly clamps to [3,15]; out-of-range values are truncated to the boundary.
Billing
HappyHorse is billed per second, multiplied by a resolution coefficient (1080P is about 1.78× of 720P).
- For t2v / i2v / r2v the duration is known at request time and is settled as actual duration × resolution coefficient.
- Video editing has no
durationinput (output = source video length), so it is billed by the declaredmetadata.durationvalue; when undeclared, a conservative default (about 10 seconds) is used.
Exact unit prices follow the console "Video Pricing" configuration and the pricing page; operators may override the defaults with the latest official rates.
Task Polling
The shared submit/poll flow, status codes, and OpenAI/Sora-compatible fetch paths are in the Video Generation overview.