Skip to main content
POST
/
v1
/
videos
/
generate
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"
}

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <YOUR_API_KEY> in the request header. Go to the API Keys management page to create and manage API Keys.

Body

application/json
model
string
required

Fixed value dashscope/happyhorse-1.0.

prompt
string

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 in reference_images (order matches the array).

Example:

"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
enum<string>
default:1080P

Output resolution. Defaults to 1080P.

Available options:
720P,
1080P
aspect_ratio
enum<string>
default:16:9

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.

Available options:
16:9,
9:16,
1:1,
4:3,
3:4
duration
integer
default:5

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).

Required range: 3 <= x <= 15
reference_images
object[]

Reference 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, no reference_videos
  • Video edit: 0–5 asset together with 1 reference_videos

Image requirements: format jpg / jpeg / png / webp; public URL or data: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.

Maximum array length: 9
reference_videos
object[]

Reference video list. Required and exactly one entry in video-edit mode. Public URL only; base64 not supported.

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.

Maximum array length: 1
extra_params
object

Model extension parameters, all optional:

  • audio_setting — string, only effective in video-edit mode. Audio handling strategy:
    • auto (default): decided by the model
    • origin: keep the original audio of the source video

Response

Submission accepted (asynchronous mode)

task_id
string

Unique task ID, used for polling.

Example:

"task_2044275355061448704"

model
string

Model ID used for this task.

Example:

"dashscope/happyhorse-1.0"

created_at
string

Task creation time (ISO 8601)

Example:

"2026-04-27T10:43:20.233Z"

request_id
string

Unique request ID.

Example:

"67e2e394-cf6f-4998-b293-ebf20d14dc26"