Skip to content
English

HappyHorse 1.1 I2V API

POST /v1/tasks

All models are called through the Unified Async API POST /v1/tasks endpoint; only the input fields differ (see input parameters below).

Model summary

Model name happyhorse-1.1/image-to-video
Type Video generation (image-to-video)
Endpoint POST /v1/tasks
Pricing See HiAPI Pricing

HappyHorse 1.1 image-to-video API by Alibaba. Animate a single first-frame image into a short video, preserving subject, style and scene, with native audio, at 720p / 1080p and 3-15 seconds.

Production guidance

Production guidance
  • For production, pass callback.url at the top level of the request body so HiAPI can notify your service when the task reaches a terminal state.
  • GET /v1/tasks/:id is better for local debugging, low-volume jobs, or fallback reconciliation if a callback is missed.
  • Use callback.when=final. Both success and fail are terminal states, so your service should deduplicate by taskId.

Best suited for

First-frame driven clips

Use one image as the first frame to generate video, preserving subject identity and style.

image_urls
Prompt-guided motion

An optional prompt controls camera motion and style direction for more predictable animation.

image_urlsprompt
Still to motion

Turn posters, illustrations, and product shots into short videos with native audio for e-commerce and social.

image_urls
Pick resolution and length

720p / 1080p tiers — choose resolution and duration to fit budget (billed per second).

resolutionduration

Request parameters

model string required

Fixed value happyhorse-1.1/image-to-video.

example happyhorse-1.1/image-to-video
input object required

Business parameters. Put HappyHorse 1.1 I2V-specific configuration here.

image_urls string[] required

First-frame image URL (exactly 1). JPEG/PNG/WEBP, shortest side >= 300px, <= 20MB.

prompt string optional

Optional text prompt to guide the generated motion and style.

resolution enum optional

Output video resolution. Higher resolution costs more.

default 1080p enum: 720p1080p
duration integer optional

Clip length in seconds (3-15). Cost scales with duration.

default 5
callback object optional

Optional callback configuration. When set, HiAPI notifies your service when the task reaches a terminal state.

url string required

Required when callback is set; HTTPS URL that receives terminal task notifications.

example https://your-domain.com/hiapi/callback
when enum optional

Callback trigger timing. Use final.

default final enum: final

Example requests

Slow push-in from first frame

1080p / 5s, uploaded image as first frame, gentle motion.

Request body
{
  "model": "happyhorse-1.1/image-to-video",
  "input": {
    "image_urls": [
      "https://static.hiapi.ai/example/first-frame.jpg"
    ],
    "prompt": "Use the uploaded image as first frame, slow camera push-in with gentle wind",
    "resolution": "1080p",
    "duration": 5
  }
}
Natural subject turn

720p / 5s — lower cost, soft lighting.

Request body
{
  "model": "happyhorse-1.1/image-to-video",
  "input": {
    "image_urls": [
      "https://static.hiapi.ai/example/portrait.jpg"
    ],
    "prompt": "Make the subject turn naturally, soft background blur, gentle lighting",
    "resolution": "720p",
    "duration": 5
  }
}
Animate a static landscape

1080p / 8s, drifting clouds and shifting light, cinematic.

Request body
{
  "model": "happyhorse-1.1/image-to-video",
  "input": {
    "image_urls": [
      "https://static.hiapi.ai/example/landscape.jpg"
    ],
    "prompt": "Add drifting clouds and shifting light to the static landscape, cinematic",
    "resolution": "1080p",
    "duration": 8
  }
}

Getting the result

  1. The response returns a taskId immediately without waiting for generation to finish.
  2. In production, prefer waiting for callback.url to receive the terminal notification. For local debugging, poll GET /v1/tasks/:id.
  3. When status=success, download the generated video from output[].url.
  4. When status=fail, fix the request based on the returned error instead of retrying the same invalid payload.

FAQ

How many images does image-to-video need?

image_urls takes exactly 1 first-frame image (JPEG/PNG/WEBP, shortest side >= 300px, <= 20MB). The video is generated starting from that frame.

Which resolutions and durations are supported?

Resolutions 720p / 1080p and durations 3-15 seconds (default 5). Billed by resolution and duration (per second); 1080p costs more than 720p. See the live pricing page for current rates. View pricing

Does the generated video include audio?

HappyHorse 1.1 produces native audio with no extra configuration, generating synchronized sound alongside the visuals.

How is this different from text-to-video and reference-to-video?

Image-to-video is driven by a single first-frame image. For pure text generation use happyhorse-1.1/text-to-video; for precise subject and style control with up to 9 reference images use happyhorse-1.1/reference-to-video.

Next steps