跳到內容
開放式卡斯塔利控制台

影片

happyhorse-1.1-t2v API

透過 Modelflare 非同步視訊路由使用準確的 happyhorse-1.1-t2v 模型 ID。

使用準確的型號 ID happyhorse-1.1-t2v。模型欄位必須與此頁面完全相符。

範例輸出happyhorse-1.1-t2vPOST /v1/videos5.2s

參數: duration=5resolution=1080pratio=16:9

提示詞: One continuous take, no cuts. An arcade after closing, cabinets still on, carpet glowing under blacklight. A figure in a holographic windbreaker slaps the side of one cabinet and its picture comes off the screen: the pixels lift as solid coloured tiles, swarm out across the aisle and pull the pictures off every other machine with them, until the whole room is a moving cloud of cyan and hot pink squares. The camera tracks sideways down the aisle and turns into the swarm as it builds. One hard cyan key from the nearest screen, deep violet ambient. Real weight and inertia, each tile catching light separately, no text.

產生此樣本的請求
{
"model": "happyhorse-1.1-t2v",
"prompt": "One continuous take, no cuts. An arcade after closing, cabinets still on, carpet glowing under blacklight. A figure in a holographic windbreaker slaps the side of one cabinet and its picture comes off the screen: the pixels lift as solid coloured tiles, swarm out across the aisle and pull the pictures off every other machine with them, until the whole room is a moving cloud of cyan and hot pink squares. The camera tracks sideways down the aisle and turns into the swarm as it builds. One hard cyan key from the nearest screen, deep violet ambient. Real weight and inertia, each tile catching light separately, no text.",
"seconds": "5",
"duration": 5,
"resolution": "1080p",
"ratio": "16:9",
"aspect_ratio": "16:9"
}

將 Modelflare API 金鑰與 https://modelflare.dev/v1 結合使用。網關入口點是POST /v1/videos。

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
終端機視窗bash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "happyhorse-1.1-t2v",
"input": {"prompt": "A white cat runs through a neon-lit street in the rain, cinematic tracking shot"},
"parameters": {"resolution": "1080P", "ratio": "16:9", "duration": 5, "watermark": false}
}'

儲存任務ID。輪詢 GET /v1/videos/{task_id} 並使用 GET /v1/videos/{task_id}/content 下載。結果 URL 可能會過期,因此請立即傳輸檔案。

終端機視窗bash
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 T2V 使用input.prompt產生影片。

場 必填 註釋
model 是 happyhorse-1.1-t2v
input.prompt 是 文字描述或參考說明,最多5,000個非中文字元或2,500個漢字
input.media[] 否 —
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

T2V僅需input.prompt;提示限制為 5,000 個非中文字元或 2,500 個漢字,輸出為 720P 或 1080P,具有 9 個比例值,持續時間為 3-15 秒。

無效模型參數傳回帶有請求 ID 的 4xx。非同步任務建立成功後也可能進入失敗;使用輪詢回應中的 error_code 和 error_message 作為最終任務原因。不要使用不同的 JSON 形狀重試相同的請求。

此頁面涵蓋 Modelflare 模型產生和編輯呼叫。搜尋或地圖豐富、語音管理和元素庫管理是此公共模型呼叫表面之外的資源 API,並且不是必需的請求欄位。

此模型採用按秒視訊計費。請參閱 型號定價頁面 ,以了解當前客戶價格、參考標價和完整規格。

媒體合約 · v1

合約 ID: media.happyhorse-1-1-t2v.v1適配器: video.happyhorse.v1@v1指紋: 4f3b6a3c628a981b1d15070759d8f96df185c43c684a22bba802349f85e3e6f9

官方來源: Alibaba Cloud Model Studio

合約參數

意圖字段控制項選項
ratioselect16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 4:5 / 5:4 / 21:9 / 9:21
resolutionselect720p / 1080p
durationselect3 / 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:21
  • allowed_values · resolution · 720p, 1080p
  • allowed_values · duration · 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15

結構化請求範例

text

意圖

{
  "duration": 3,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p"
}

提供者請求

{
  "duration": 3,
  "model": "happyhorse-1.1-t2v",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p",
  "seconds": "3"
}