安裝 belt CLI 技能:
npx skills add belt-sh/cli
HappyHorse 1.0 影片生成
透過 inference.sh CLI 使用阿里巴巴 HappyHorse 1.0 模型生成和編輯符合物理真實感的影片。
快速開始
需要 inference.sh CLI(
belt)。安裝說明
belt login
belt app run alibaba/happyhorse-1-0-t2v --input '{"prompt": "a horse galloping across a sunlit meadow"}'
HappyHorse 模型
| 模型 | App ID | 最佳用途 |
|---|---|---|
| T2V | alibaba/happyhorse-1-0-t2v | 文字轉影片,符合物理真實感的動作 |
| I2V | alibaba/happyhorse-1-0-i2v | 將單一圖片製成動畫 |
| R2V | alibaba/happyhorse-1-0-r2v | 從最多 9 張參考圖片保留角色特徵 |
| Video Edit | alibaba/happyhorse-1-0-video-edit | 用自然語言編輯現有影片 |
所有模型皆支援 720P/1080P 解析度,最長 15 秒。
範例
文字轉影片
belt app run alibaba/happyhorse-1-0-t2v --input '{
"prompt": "a golden retriever running through autumn leaves in a park, slow motion",
"duration": 10,
"resolution": "1080P",
"ratio": "16:9"
}'
圖片轉影片
將靜態圖片製成動畫:
belt app run alibaba/happyhorse-1-0-i2v --input '{
"first_frame": "https://your-image.jpg",
"prompt": "gentle camera zoom, clouds moving in the sky",
"duration": 8,
"resolution": "720P"
}'
參考圖片轉影片(角色一致化)
從參考圖片(最多 9 張)生成保留角色特徵的影片:
belt app run alibaba/happyhorse-1-0-r2v --input '{
"prompt": "a woman walking through a busy market street",
"reference_images": ["https://portrait.jpg"],
"duration": 10,
"resolution": "720P"
}'
多角色參考
belt app run alibaba/happyhorse-1-0-r2v --input '{
"prompt": "two friends sitting at a cafe having coffee",
"reference_images": ["https://person1.jpg", "https://person2.jpg"],
"ratio": "16:9"
}'
影片編輯
使用自然語言指令編輯現有影片:
belt app run alibaba/happyhorse-1-0-video-edit --input '{
"video": "https://your-video.mp4",
"prompt": "change the background to a snowy mountain landscape"
}'
搭配參考圖片的影片編輯
belt app run alibaba/happyhorse-1-0-video-edit --input '{
"video": "https://your-video.mp4",
"prompt": "replace the person with the character from the reference image",
"reference_images": ["https://character.jpg"]
}'
支援音訊控制的影片編輯
belt app run alibaba/happyhorse-1-0-video-edit --input '{
"video": "https://your-video.mp4",
"prompt": "make the scene look like a rainy day",
"audio_setting": "generate"
}'
定價
| 解析度 | 價格 |
|---|---|
| 720P | 每秒 $0.14 美元 |
| 1080P | 每秒 $0.24 美元 |
影片編輯按輸入 + 輸出時長計費。
參數(T2V)
| 參數 | 類型 | 預設值 | 說明 |
|---|---|---|---|
prompt | string | 必填 | 影片的文字描述 |
duration | integer | 5 | 時長(秒),範圍 3–15 |
resolution | enum | 720P | 720P 或 1080P |
ratio | enum | 16:9 | 16:9、9:16、1:1、4:3、3:4、21:9 |
seed | integer | 隨機 | 可重現的生成種子 |
watermark | boolean | false | 加入 HappyHorse 浮水印 |
參數(I2V)
| 參數 | 類型 | 預設值 | 說明 |
|---|---|---|---|
first_frame | file | 必填 | 首幀圖片(JPEG、PNG、WebP) |
prompt | string | - | 可選的文字描述 |
duration | integer | 5 | 時長(秒),範圍 3–15 |
resolution | enum | 720P | 720P 或 1080P |
seed | integer | 隨機 | 可重現的生成種子 |
參數(R2V)
| 參數 | 類型 | 預設值 | 說明 |
|---|---|---|---|
prompt | string | 必填 | 場景的文字描述 |
reference_images | array | 必填 | 最多 9 張角色參考圖片 |
duration | integer | 5 | 時長(秒),範圍 3–15 |
resolution | enum | 720P | 720P 或 1080P |
ratio | enum | 16:9 | 16:9、9:16、1:1、4:3、3:4、21:9 |
seed | integer | 隨機 | 可重現的生成種子 |
參數(Video Edit)
| 參數 | 類型 | 預設值 | 說明 |
|---|---|---|---|
video | file | 必填 | 要編輯的影片(MP4/MOV,H.264) |
prompt | string | 必填 | 編輯指令 |
reference_images | array | - | 最多 5 張參考圖片 |
audio_setting | enum | auto | auto、generate 或 keep_original |
resolution | enum | 720P | 720P 或 1080P |
seed | integer | 隨機 | 可重現的生成種子 |
搜尋 HappyHorse 應用程式
belt app search "happyhorse"
相關技能
# 完整平台技能(所有應用程式)
npx skills add inference-sh/skills@infsh-cli
# 所有影片生成模型
npx skills add inference-sh/skills@ai-video-generation
# Seedance 2.0
npx skills add inference-sh/skills@seedance
# Google Veo
npx skills add inference-sh/skills@google-veo
# 圖片生成(用於圖片轉影片)
npx skills add inference-sh/skills@ai-image-generation
瀏覽所有影片應用程式:belt app list --category video