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

影片

kling-o1 API

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

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

範例輸出kling-o1POST /v1/videos5.0s

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

提示詞: One continuous take, no cuts. A long subway escalator at night, tiled tunnel, nobody else on it. A figure in an oversized violet coat rides down with one hand on the rail; where the hand passes, the handrail stops being rubber and becomes a running river of liquid mercury that keeps flowing down both sides and pools at the bottom of the shaft, throwing the tunnel lights back as broken silver. The camera descends ahead of the figure, facing back up the escalator, and tilts down as the mercury reaches the floor. One hard cold key from the tunnel strip lights, a warm amber glow rising from the pool. Real weight and inertia, metal surface tension, no text.

產生此樣本的請求
{
"model": "kling-o1",
"prompt": "One continuous take, no cuts. A long subway escalator at night, tiled tunnel, nobody else on it. A figure in an oversized violet coat rides down with one hand on the rail; where the hand passes, the handrail stops being rubber and becomes a running river of liquid mercury that keeps flowing down both sides and pools at the bottom of the shaft, throwing the tunnel lights back as broken silver. The camera descends ahead of the figure, facing back up the escalator, and tilts down as the mercury reaches the floor. One hard cold key from the tunnel strip lights, a warm amber glow rising from the pool. Real weight and inertia, metal surface tension, 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_name": "kling-o1",
"prompt": "A white cat runs through a neon-lit street in the rain, cinematic tracking shot",
"duration": "5", "mode": "std"
}'

儲存任務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"

Kling 使用系列特定的 model_name、prompt、mode、duration、image_list 或 contents / settings 欄位;本機 JSON 保留並轉送。

Kling Omni/O1 使用 model_name、prompt 和媒體清單。組合image_list、video_list、element_list、multi_shot和sound時請遵循每個模型的官方限制。

場 必填 註釋
model_name 是 kling-o1
prompt 有條件 停用連拍時需要
mode 否 std / pro
aspect_ratio 有條件 16:9 / 9:16 / 1:1
duration 否 3–15 秒(字串)
image_list 否 第一/結束畫面、場景或風格參考; Omni/O1 允許型號限制內的多個項目
video_list 否 影片編輯或風格參考
element_list 否 Kling 元素 ID;此整合不提供元素管理
multi_shot 否 啟用多鏡頭故事板
sound 否 是否產生同步聲音

O1支援720p/1080p、3-10秒以及影像/影片/元素引用。當video_list存在時,將sound設定為關閉;不支援 4k 和連拍。

終端機視窗bash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_name": "kling-o1",
"prompt": "让图 1 中的人物在雨中向镜头挥手",
"image_list": [{"image_url": "https://example.com/character.png"}],
"duration": "5", "mode": "pro", "aspect_ratio": "16:9", "sound": "off"
}'

參考影片、元素和多鏡頭組合必須遵循本頁的限制;當存在參考影片時關閉 sound。

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

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

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

媒體合約 · v1

合約 ID: media.kling-o1.v1適配器: video.kling.omni.v1@v1指紋: 64a427a3f22b5fe4674625e1d0b00f331fc9e2fcc37837e604944c682ec00002

官方來源: Kuaishou Kling

合約參數

意圖字段控制項選項
ratioselect16:9 / 9:16 / 1:1
resolutionselect720p / 1080p
durationselect3 / 5 / 8 / 10
audioswitch—

支援的功能

  • allowed_values · ratio · 16:9, 9:16, 1:1
  • allowed_values · resolution · 720p, 1080p
  • allowed_values · duration · 3, 5, 8, 10
  • max_assets · reference_asset_ids · 7

結構化請求範例

text

意圖

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

提供者請求

{
  "aspect_ratio": "16:9",
  "duration": "3",
  "mode": "std",
  "model_name": "kling-o1",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "sound": "off"
}

reference

意圖

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

提供者請求

{
  "aspect_ratio": "16:9",
  "duration": "3",
  "image_list": [
    {
      "image_url": "https://example.com/reference.png"
    }
  ],
  "mode": "std",
  "model_name": "kling-o1",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "sound": "off"
}