Model Description
Capability Map of Each Model
| happyhorse-1.0-t2v | happyhorse-1.0-i2v | happyhorse-1.0-r2v | happyhorse-1.0-video-edit | |
|---|---|---|---|---|
| Text-to-Video | ✅ | |||
| Image-to-Video | ✅ | |||
| Reference student video | ✅ | |||
| Edit Video | ✅ |
Function Interface Details
Video URLs are only retained for 24 hours and will be automatically deleted after the timeout. Please save the generated video in a timely manner.
Create a video generation task (unified interface for text-to-video, image-to-video, reference-based video generation, and video editing)
Request URL
POST https://{新平台域名}/v1/ai/{endpointPath}/happyhorse/v1/video-synthesis
Request Body Parameters
| Parameter Name | Field Type | Required or Not | Default Value | Description |
|---|---|---|---|---|
| model |
string | is | - | 模型名称,固定值:happyhorse-1.0-t2v / happyhorse-1.0-i2v / happyhorse-1.0-r2v / happyhorse-1.0-video-edit |
| input | object | is | - | Input Object |
| input.prompt |
string | No | - | Text prompt. Used to describe the expected generated video content. Supports input in any language, with a length not exceeding 5000 non-Chinese characters or 2500 Chinese characters; any excess will be automatically truncated. |
| input.media | array | No | - | Input media list. Used to specify the video to be edited and the reference image Used in scenarios such as image-to-video, reference-to-video, and video editing,for details, see the description below the table |
| input.media[].type |
string | No | - | first_frame / reference_image /video/ reference_image See the instructions below the table |
| input.media[].url | string | No | - | Media Creatives URL See the instructions below the table |
| parameters | object | No | - | Generation Parameters |
| parameters.resolution |
string | No | 1080P | Resolution levels for generated videos 720P / 1080P |
| parameters.ratio | string | No | 16:9 | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 Only used in text-to-video/reference-to-video |
| parameters.duration |
integer | No | 5 | Duration (seconds), an integer between 3 and 15 Only used in text-to-video/image-to-video/reference-to-video |
| parameters.watermark |
boolean | No | true | Whether to add watermark The watermark is located in the bottom right corner of the video, with the text fixed as Happy Horse. |
| parameters.audio_setting |
string |
No | auto | auto: The model controls itself origin: Retain the original audio of the input video For video editing use only |
| parameters.seed |
integer | No | - | Random seed [0, 2147483647] Please note that due to the probabilistic nature of model generation, even when using the same random seed, it cannot be guaranteed that the results of each generation will be completely identical. |
Text-to-Video:
- input.prompt is required
Image-to-Video:
-
input.prompt is optional, input.media.type is required, and input.media.url is required
-
The optional values for the input.media.type field are:
first_frame, Creative restrictions: There must be exactly 1 first frame image. -
input.media.url
First frame URL. Supports HTTP or HTTPS protocol.
Image Restrictions:
-
Format: JPEG, JPG, PNG, WEBP.
-
Resolution: Width and height are not less than 300 pixels.
-
Aspect ratio: 1:2.5 to 2.5:1.
-
File size: no more than 10MB.
Reference student video:
-
input.prompt is required, input.media.type is required, input.media.url is required
-
Reference Indicators: In the prompt, use
character1,character2to identify the reference images at corresponding positions in the media array, with the order consistent with that of the media array. -
Each element of the media array is a media object, containing the type and url fields.
-
Define the order of role references in the prompt according to the array order.
-
The first
reference_imagein the array corresponds to character1 , the second corresponds to character2 , and so on. -
input.media.type is fixed to
reference_image, number of reference images: 1 to 9. -
input.media.url supports HTTP or HTTPS protocols.
-
Format: JPEG, JPG, PNG, WEBP.
-
Resolution: The short side should not be less than 400 pixels, and clear images above 720P are recommended. Avoid uploading images that are too small, blurry, or over-compressed, as they may affect the result.
-
File size: no more than 10MB.
Video Editing:
-
input.prompt is required, input.media.type is required, input.media.url is required
-
input.media.type options:
video,reference_image, there must be exactly 1 input.media of type video, and 0-5 of type reference_image -
input.media.url (type=video)
-
Format: MP4, MOV (H.264 encoding recommended).
-
Duration: 3 to 60 seconds.
-
Resolution: The long side should not exceed 2160 pixels, and the short side should not be less than 320 pixels.
-
Aspect ratio: 1:2.5 to 2.5:1.
-
File size: no more than 100MB.
-
Frame rate: greater than 8fps.
Description
Output video duration: 3 - 15 seconds.
When the input video is no longer than 15 seconds, the duration of the output video remains consistent with that of the input video.
When the input video exceeds 15 seconds, the system will automatically capture the first 15 seconds from the beginning as the valid segment, so the maximum output duration is 15 seconds.
-
input.media.url (type=reference_image)
-
The URL of the reference image must be a publicly accessible URL.
-
Supports HTTP or HTTPS protocol.
-
Format: JPEG, JPG, PNG, WEBP.
-
Resolution: Width and height dimensions are not less than 300 pixels.
-
Aspect ratio: 1:2.5 to 2.5:1.
-
File size: no more than 10MB
Response Parameter
| Parameter Name | Field Type | Description |
|---|---|---|
| output | object | Task Output Information |
| output.task_id | string | Task ID (for querying results) |
| output.task_status |
string | PENDING / RUNNING / SUCCEEDED / FAILED / CANCELED / UNKNOWN |
| request_id | string | Request Unique Identifier |
| code | string | Failure error code, this parameter will not be returned when the request is successful |
| message | string | Failure error message, this parameter will not be returned when the request is successful |
Request Example
curl --location 'http://{新平台域名}/v1/ai/{endpoint}/happyhorse/v1/video-synthesis' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
"model": "happyhorse-1.0-t2v",
"input": {
"prompt": "A miniature city built of cardboard and bottle caps comes to life at night. A cardboard train moves slowly through it, dotted with small lights that illuminate the way."
},
"parameters": {
"resolution": "720P",
"ratio": "16:9",
"duration": 5
}
}'
Response Example
{
"output": {
"task_status": "PENDING",
"task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
},
"request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}
Query task results
Request URL
GET https://{新平台域名}/v1/ai/{endpointPath}/happyhorse/v1/tasks/{taskId}
Path Parameter
| Parameter Name | Field Type | Required or Not | Default Value | Description |
|---|---|---|---|---|
| taskId | string | is | - | output.task_id returned by creating a task |
Response Parameters
| Parameter Name | Field Type | Description |
|---|---|---|
| output | object | Task Output Information |
| output.task_id | string | Task status, query validity period is 24 hours. |
| output.task_status | string | Task Status |
| output.submit_time | string | Task submission time. The time zone is UTC+8, and the format is YYYY-MM-DD HH:mm:ss.SSS. |
| output.scheduled_time |
string | Task execution time. The time zone is UTC+8, and the format is YYYY-MM-DD HH:mm:ss.SSS. |
| output.end_time | string | Task completion time. The time zone is UTC+8, and the format is YYYY-MM-DD HH:mm:ss.SSS. |
| output.video_url |
string | Video URL. Only returned when task_status is SUCCEEDED. The link is valid for 24 hours, and the video can be downloaded via this URL. The video has a frame rate of 24fps and is in MP4 format (H.264 encoding). |
| output.orig_prompt | string | The original input prompt, corresponding to the request parameter prompt. |
| output.code | string | Failure error code, this parameter will not be returned when the request is successful |
| output.message | string | Failure error message, this parameter will not be returned when the request is successful |
| usage | object | Dosage (duration, SR, ratio, etc.) |
| usage.input_video_duration | integer | Duration of the input video, in seconds. |
| usage.output_video_duration | integer | Duration of the output video, in seconds. |
| usage.duration | integer | Total video duration, used for billing. |
| usage.SR | integer | Resolution level of the output video. |
| usage.video_count | integer | Number of output videos. Fixed at 1 |
| request_id | string | Request Unique Identifier |
Request Example
curl --location 'http://{新平台域名}/v1/ai/{endpoint}/happyhorse/v1/tasks/{taskId}' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json'
Response Example
{
"request_id": "99243b47-ec5f-9413-9993-xxxxxx",
"output": {
"task_id": "4673458e-28be-4a05-bf2a-xxxxxx",
"task_status": "SUCCEEDED",
"submit_time": "2026-04-20 17:55:17.075",
"scheduled_time": "2026-04-20 17:55:17.129",
"end_time": "2026-04-20 17:56:36.658",
"orig_prompt": "A miniature city built of cardboard and bottle caps comes to life at night. A cardboard train moves slowly through it, dotted with small lights that illuminate the way.",
"video_url": "https://dashscope-result.oss-cn-beijing.aliyuncs.com/xxx.mp4?Expires=xxx"
},
"usage": {
"duration": 5,
"input_video_duration": 0,
"output_video_duration": 5,
"video_count": 1,
"SR": 720,
"ratio": "16:9"
}
}