curl --request POST \
--url https://openapi.imini.ai/imini/router/v1/videos/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "dashscope/happyhorse-1.0",
"prompt": "A miniature city built from cardboard and bottle caps comes alive at night, with a cardboard train rolling past lit by tiny string lights.",
"resolution": "720P",
"aspect_ratio": "16:9",
"duration": 5
}
'{
"task_id": "task_2044275355061448704",
"model": "dashscope/happyhorse-1.0",
"created_at": "2026-04-27T10:43:20.233Z",
"request_id": "67e2e394-cf6f-4998-b293-ebf20d14dc26"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "aspect_ratio is not accepted in I2V mode (output follows first_frame)",
"status": 400,
"request_id": "req_abc123"
}
}HappyHorse 1.0
HappyHorse 1.0 video generation model. Supports text-to-video, image-to-video (first frame), reference-to-video (multi-image), and video editing (video + reference images).
curl --request POST \
--url https://openapi.imini.ai/imini/router/v1/videos/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "dashscope/happyhorse-1.0",
"prompt": "A miniature city built from cardboard and bottle caps comes alive at night, with a cardboard train rolling past lit by tiny string lights.",
"resolution": "720P",
"aspect_ratio": "16:9",
"duration": 5
}
'{
"task_id": "task_2044275355061448704",
"model": "dashscope/happyhorse-1.0",
"created_at": "2026-04-27T10:43:20.233Z",
"request_id": "67e2e394-cf6f-4998-b293-ebf20d14dc26"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "aspect_ratio is not accepted in I2V mode (output follows first_frame)",
"status": 400,
"request_id": "req_abc123"
}
}Authorizations
Pass Authorization: Bearer <YOUR_API_KEY> in the request header. Go to the API Keys management page to create and manage API Keys.
Body
Fixed value dashscope/happyhorse-1.0.
Prompt, up to 5000 characters. Supports Chinese, English, Japanese, Korean, and other languages.
In reference-to-video mode, use
character1,character2, … in the prompt to refer to the N-th image inreference_images(order matches the array).
"A miniature city built from cardboard and bottle caps comes alive at night, with a cardboard train rolling past lit by tiny string lights."
Output resolution. Defaults to 1080P.
720P, 1080P Output aspect ratio. Defaults to 16:9. Only accepted by text-to-video and reference-to-video. Image-to-video (first frame) follows the first frame; video edit follows the source video.
16:9, 9:16, 1:1, 4:3, 3:4 Video duration (seconds). Defaults to 5, integer in 3 ~ 15. Not accepted in video-edit mode (output length follows the source video, capped at 15s).
3 <= x <= 15Reference image list. The combination of reference_type and reference_videos determines the input mode:
- Image-to-video (first frame): 1
first_frame - Reference-to-video: 1–9
asset, noreference_videos - Video edit: 0–5
assettogether with 1reference_videos
Image requirements: format
jpg/jpeg/png/webp; public URL ordata:image/base64; first-frame mode requires width/height ≥ 300 px, aspect ratio between 1:2.5 and 2.5:1, ≤ 10 MB per image; reference-to-video requires shorter side ≥ 400 px, 720P or higher recommended.
9Show child attributes
Show child attributes
Editing requires exactly 1 video explicitly marked reference_type=edit_source, optionally with 0-5 asset images. Ordinary asset videos are ignored and do not trigger editing.
Video requirements: format
mp4/mov(H.264 recommended); duration 3 ~ 60s (anything beyond 15s is auto-truncated to the first 15s); long side ≤ 2160 px, short side ≥ 320 px; aspect ratio 1:2.5 ~ 2.5:1; ≤ 100 MB; FPS > 8.
1Show child attributes
Show child attributes
Model extension parameters, all optional:
audio_setting— string, only effective in video-edit mode. Audio handling strategy:auto(default): decided by the modelorigin: keep the original audio of the source video
Show child attributes
Show child attributes
Response
Submission accepted (asynchronous mode)
Unique task ID, used for polling.
"task_2044275355061448704"
Model ID used for this task.
"dashscope/happyhorse-1.0"
Task creation time (ISO 8601)
"2026-04-27T10:43:20.233Z"
Unique request ID.
"67e2e394-cf6f-4998-b293-ebf20d14dc26"

