Generate videos using HappyHorse 1.0 with three modes: text-to-video, image-to-video (first frame), and reference-to-video (character consistency using reference images).

Model

alibaba/happyhorse-1.0-video

Modes

ModeDescription
t2vGenerate video from a text prompt
i2vGenerate video from a first frame image
r2vGenerate video from reference images. Use characterN in prompt to reference them

Parameters

ParameterTypeRequiredDefaultDescription
modestringNo"t2v""t2v", "i2v", or "r2v"
promptstringNo""Text prompt describing the desired video. Supports any language. Max 5,000 non-Chinese characters or 2,500 Chinese characters; excess is truncated
first_frame_urlstringNonullURL of the first frame image for I2V mode
reference_image_urlsstring[]NonullReference image URLs for R2V mode (1-9). Use characterN in prompt to reference them
ratiostringNonullAspect ratio (T2V/R2V only): "16:9", "9:16", "1:1", "4:3", "3:4"
resolutionstringNo"1080P""720P" or "1080P"
durationintegerNo5Output duration in seconds (3-15)
watermarkbooleanNofalseAdd watermark to the output
seedintegerNonullRandom seed for reproducible generation (0-2147483647)

Example - Text-to-Video

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "alibaba/happyhorse-1.0-video",
    "input": {
      "mode": "t2v",
      "prompt": "A golden retriever running through a field of wildflowers at sunset",
      "resolution": "1080P",
      "ratio": "16:9",
      "duration": 5
    }
  }'

Example - Image-to-Video

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "alibaba/happyhorse-1.0-video",
    "input": {
      "mode": "i2v",
      "prompt": "The camera slowly zooms out as the scene comes to life",
      "first_frame_url": "https://example.com/landscape.png",
      "resolution": "1080P",
      "duration": 10
    }
  }'

Example - Reference-to-Video

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "alibaba/happyhorse-1.0-video",
    "input": {
      "mode": "r2v",
      "prompt": "character1 walks confidently through a busy city street",
      "reference_image_urls": ["https://example.com/person.png"],
      "resolution": "1080P",
      "ratio": "16:9",
      "duration": 8
    }
  }'

Response

{
  "code": 200,
  "success": true,
  "data": {
    "task_id": "abc123def456",
    "status": "pending"
  }
}