影片
happyhorse-1.1-r2v API
透過 Modelflare 非同步視訊路由使用準確的 happyhorse-1.1-r2v 模型 ID。
使用準確的型號 ID happyhorse-1.1-r2v。模型欄位必須與此頁面完全相符。
參數: duration=5resolution=1080pratio=16:9輸入影像
提示詞: One continuous take, no cuts. Keep the woman in the crimson satin coat and the peeling carpet ribbons from the reference and move the event outdoors: she walks out of a revolving door onto a wet plaza and the patterned ribbons keep tearing up behind her, now lifting off the paving stones and streaming out across the square in a long coloured wake. The camera tracks backward ahead of her at waist height and cranes up as the wake spreads. One hard green sign light above the door, warm street lamps across the plaza. Real weight and inertia, satin and wet stone, no text.
{ "model": "happyhorse-1.1-r2v", "prompt": "One continuous take, no cuts. Keep the woman in the crimson satin coat and the peeling carpet ribbons from the reference and move the event outdoors: she walks out of a revolving door onto a wet plaza and the patterned ribbons keep tearing up behind her, now lifting off the paving stones and streaming out across the square in a long coloured wake. The camera tracks backward ahead of her at waist height and cranes up as the wake spreads. One hard green sign light above the door, warm street lamps across the plaza. Real weight and inertia, satin and wet stone, no text.", "seconds": "5", "duration": 5, "resolution": "1080p", "ratio": "16:9", "aspect_ratio": "16:9", "image": "https://example.com/input-image.png"}身份驗證與端點
Section titled “身份驗證與端點”將 Modelflare API 金鑰與 https://modelflare.dev/v1 結合使用。網關入口點是POST /v1/videos。
Authorization: Bearer YOUR_MODELFLARE_API_KEYcurl https://modelflare.dev/v1/videos \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "happyhorse-1.1-r2v", "input": {"prompt": "The person in [Image 1] picks up [Image 2].", "media": [{"type": "reference_image", "url": "https://example.com/person.jpg"}, {"type": "reference_image", "url": "https://example.com/object.jpg"}]}, "parameters": {"resolution": "1080P", "ratio": "16:9", "duration": 5, "watermark": false} }'儲存任務ID。輪詢 GET /v1/videos/{task_id} 並使用 GET /v1/videos/{task_id}/content 下載。結果 URL 可能會過期,因此請立即傳輸檔案。
curl https://modelflare.dev/v1/videos/TASK_ID \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"HappyHorse 使用 input.prompt;選擇與 t2v、i2v 或 r2v 模型 ID 相符的 input.media 形狀。
HappyHorse R2V 將 1-9 個 reference_image 項放入 input.media 中,並根據提示按順序引用它們。
| 場 | 必填 | 註釋 |
|---|---|---|
model |
是 | happyhorse-1.1-r2v |
input.prompt |
是 | 文字描述或參考說明,最多5,000個非中文字元或2,500個漢字 |
input.media[] |
是 | 1–9 reference_image 項目;公共 URL 或 Base64,小於 20 MB,短邊最小 400px |
parameters.resolution |
否 | 720P / 1080P,預設 1080P |
parameters.ratio |
否 | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 4:5 / 5:4 / 9:21 / 21:9,預設 16:9 |
parameters.duration |
否 | 3–15 秒,預設 5 |
parameters.watermark |
否 | 是否添加HappyHorse浮水印 |
parameters.seed |
否 | 可選種子從 0 到 2,147,483,647 |
輸入與輸出限制
Section titled “輸入與輸出限制”R2V 使用 1-9 個 reference_image 項目,並以提示順序將它們稱為影像 1、影像 2 等。提示文字限制為 5,000 個非中文字元或 2,500 個漢字;影像小於 20 MB,短邊最小為 400 像素。
錯誤與失敗的任務
Section titled “錯誤與失敗的任務”無效模型參數傳回帶有請求 ID 的 4xx。非同步任務建立成功後也可能進入失敗;使用輪詢回應中的 error_code 和 error_message 作為最終任務原因。不要使用不同的 JSON 形狀重試相同的請求。
此頁面涵蓋 Modelflare 模型產生和編輯呼叫。搜尋或地圖豐富、語音管理和元素庫管理是此公共模型呼叫表面之外的資源 API,並且不是必需的請求欄位。
此模型採用按秒視訊計費。請參閱 型號定價頁面 ,以了解當前客戶價格、參考標價和完整規格。
媒體合約 · v1
官方來源: Alibaba Cloud Model Studio
合約參數
| 意圖字段 | 控制項 | 選項 |
|---|---|---|
ratio | select | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 4:5 / 5:4 / 21:9 / 9:21 |
resolution | select | 720p / 1080p |
duration | select | 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15 |
支援的功能
allowed_values·ratio· 16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 21:9, 9:21allowed_values·resolution· 720p, 1080pallowed_values·duration· 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15required_assets·reference_asset_idsmax_assets·reference_asset_ids· 9
結構化請求範例
reference
意圖
{
"duration": 3,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"reference_asset_ids": [
"asset_example"
],
"resolution": "720p"
}提供者請求
{
"duration": 3,
"image": "https://example.com/reference.png",
"model": "happyhorse-1.1-r2v",
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"resolution": "720p",
"seconds": "3"
}