Skip to content
Trang này chưa có bản dịch sang ngôn ngữ của bạn, nên hiện đang được hiển thị bằng tiếng Anh.

HappyHorse 1.1 Video Generation

Alibaba Cloud Bailian HappyHorse 1.1 video generation model (unified entry, single-model auto-routing)

Toàn bộ tài liệu
POST/v1/videos/generations
  • Auto-routes by parameters: T2V (prompt only) / I2V (first_frame_image) / R2V (image_urls)
  • Supports 720P/1080P resolutions and any integer duration from 3 to 15 seconds
  • Billed by resolution × duration (seconds) only, regardless of capability

Ví dụ request

curl --request POST \
  --url https://api.apisea.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "happyhorse-1.1",
    "prompt": "A little girl walking down the road, cinematic feel",
    "resolution": "1080P",
    "size": "16:9",
    "duration": 5,
    "seed": 42
  }'

Authorization

Authorizationstringrequired

All API endpoints require Bearer Token authentication

Get your API Key:

Visit the API Key Management Page to get your API Key

Add it to the request header:

text
Authorization: Bearer YOUR_API_KEY

Mode Routing

happyhorse-1.1 is the unified entry for Text-to-Video / Image-to-Video / Reference-Image-to-Video. The backend automatically determines the mode based on incoming parameters. All modes are billed by the same rule (resolution × seconds only):

Fields you passRoutes ToMode Description
prompt onlyText-to-Video (T2V)Generate video purely from text
prompt + first_frame_imageImage-to-Video (I2V)Animate from a first-frame image
prompt + image_urls (1–9 images)Reference-Image-to-Video (R2V)Generate a new scene from reference images

Routing priority (high to low): first_frame_image > image_urls > prompt only.

Mutual exclusion rules: the two media fields (first_frame_image / image_urls) are mutually exclusive. Passing both mutually exclusive fields returns 400 mixed_media_not_allowed.

Request Parameters

modelstringrequired

Video generation model name, fixed as happyhorse-1.1

nsfw_checkbooleandefault: false

Whether to run content moderation before submitting the video task.

  • true: use omni-moderation-latest to review prompts and input images
  • false or omitted: do not send a moderation request, adding no moderation cost or latency (default)
promptstring

Video content description, up to 2500 characters; cannot contain special tokens

Example: "A little girl walking down the road, cinematic feel"

first_frame_imagestring

First-frame image, triggers I2V (Image-to-Video). Supports URL or base64 (data:image/<mime>;base64,<payload>, the gateway uploads it to OSS automatically)

Mutually exclusive with image_urls

Note

First-frame image requirements:

  • Format: JPEG / JPG / PNG / BMP / WEBP
  • Short side: ≥ 300px
  • Aspect ratio: 1:2.5 to 2.5:1
  • File size: ≤ 10MB
image_urlsarray\

Image array (R2V mode): 1–9 images, used as subject/style references to generate a new scene

Supports URL or base64

Mutually exclusive with first_frame_image

Note

Reference image requirements:

  • Format: JPEG / JPG / PNG / BMP / WEBP
  • Short side: ≥ 720p recommended
  • Aspect ratio: short / long ≥ 0.4
  • File size: ≤ 10MB
  • Count: 1–9 images
resolutionstringdefault: 1080P

Video resolution (affects billing)

Options:

  • 720P - Standard
  • 1080P - High definition (default)
durationintegerdefault: 5

Video duration in seconds (affects billing)

Supported range: any integer from 3 to 15

Default: 5

sizestringdefault: 16:9

Aspect ratio

Supported formats:

  • 16:9 - Landscape widescreen (default)
  • 9:16 - Portrait
  • 1:1 - Square
  • 4:3 - Landscape
  • 3:4 - Portrait

Warning

Ignored in I2V mode — the output aspect ratio is determined automatically by the input media (first-frame image)

watermarkbooleandefault: false

Whether to add a watermark to the generated video

  • true: Add watermark
  • false: Do not add watermark (default)
seedinteger

Random seed used to control the randomness of generated content

Value range: [0, 2147483647]. If omitted, a random seed is used.

Note

  • For identical requests, the model generates different results when receiving different seed values (e.g., omitting seed)
  • For identical requests, the model generates similar results when receiving the same seed value, but exact consistency is not guaranteed

Response

codeinteger

Response status code, 200 on success

dataarray

Response data array

Array Elements

statusstring

Task status, submitted when initially submitted

task_idstring

Unique task identifier for querying task status and results

Use Cases

Case 1: Text-to-Video T2V (Simplest Request)

json
{
  "model": "happyhorse-1.1",
  "prompt": "A little girl walking down the road, cinematic feel"
}

Case 2: Text-to-Video T2V (Full Parameters)

json
{
  "model": "happyhorse-1.1",
  "prompt": "A coastal road at sunset, slow-motion camera push-in, cinematic feel",
  "resolution": "1080P",
  "size": "16:9",
  "duration": 8,
  "seed": 42
}

Case 3: Image-to-Video I2V (first_frame_image)

json
{
  "model": "happyhorse-1.1",
  "prompt": "Bring the scene in the image to life",
  "first_frame_image": "https://example.com/first_frame.png",
  "resolution": "1080P",
  "duration": 5
}

Case 4: Reference-Image-to-Video R2V (multiple references)

json
{
  "model": "happyhorse-1.1",
  "prompt": "The protagonist from image 1 runs through the scene from image 2, then picks up the prop from image 3. Keep a 3D cartoon style with smooth motion.",
  "image_urls": [
    "https://example.com/img_01.jpg",
    "https://example.com/img_02.png",
    "https://example.com/img_03.jpeg"
  ],
  "resolution": "1080P",
  "size": "16:9",
  "duration": 5
}

Case 5: 720P to Save Cost

json
{
  "model": "happyhorse-1.1",
  "prompt": "Waves crashing on the beach at sunset",
  "resolution": "720P",
  "size": "16:9",
  "duration": 5
}

Mode Selection Guide

RequirementRecommended Approach
Generate video from text onlyPass only prompt (T2V)
Make an image "come alive" (use it as the first frame)Pass first_frame_image (I2V)
Generate a new scene from a set of reference imagesPass image_urls (1–9, R2V)
Save costUse resolution: "720P"

Usage Tips

  1. Unified entry logic: input fields decide the mode. Note that the two media fields (first_frame_image / image_urls) are mutually exclusive
  2. size only effective in T2V/R2V: in I2V mode size is ignored — the output aspect ratio is determined by the input media
  3. Duration: 5–10 seconds is the sweet spot. Too short causes choppy motion; too long significantly increases upstream processing time
  4. First-frame image quality: clear, well-composed, subject centered — significantly improves I2V output
  5. Prompt writing: describe motion / camera / atmosphere (e.g., "slow push-in, cinematic, warm tones") for better results than purely static scene descriptions

Note

Query Task Results

Video generation is an async task that returns a task_id upon submission. Use the Get Task Status endpoint to query generation progress and results.

Phản hồi

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
    }
  ]
}

Phát hiện lỗi trong tài liệu này? Gửi email đến support@apisea.ai.