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

影片

kling-3.0-turbo API

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

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

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

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

提示詞: A skateboarder launches a kickflip over a concrete stair set in a skate park at golden hour. Low-angle slow-motion tracking shot, the board spins under his feet, dust and sunlight flare, he lands and rolls past the camera. Realistic physics, cinematic sports film, no text.

產生此樣本的請求
{
"model": "kling-3.0-turbo",
"prompt": "A skateboarder launches a kickflip over a concrete stair set in a skate park at golden hour. Low-angle slow-motion tracking shot, the board spins under his feet, dust and sunlight flare, he lands and rolls past the camera. Realistic physics, cinematic sports film, 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": "kling-3.0-turbo",
"prompt": "A white cat runs through a neon-lit street in the rain, cinematic tracking shot",
"settings": {"duration": 5, "resolution": "720p"}
}'

儲存任務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 3.0 Turbo選擇URL路徑中的型號;請勿將model_name放入體內。文字轉影片和首幀影像轉影片使用不同的官方路徑。

場 必填 註釋
prompt 是 文字轉影片提示;使用官方長度限制
contents[] 有條件 對於影像轉視頻,包括prompt和first_frame
settings.resolution 否 720p / 1080p
settings.aspect_ratio 否 16:9 / 9:16 / 1:1
settings.duration 否 3–15 秒
options.watermark_info 否 浮水印配置

文字轉影片和首幀影像轉影片分別使用prompt和contents[]。輸出為 720p 或 1080p,持續 3-15 秒;連拍提示最多支援六次連拍。

Turbo 使用升級的contents/settings/options包絡。模型 ID 保留在 Modelflare 的 model 欄位中,通話透過 /v1/videos 輸入。

終端機視窗bash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-3.0-turbo",
"contents": [{"type": "prompt", "text": "列车缓慢驶过雨夜城市"}],
"settings": {"resolution": "1080p", "aspect_ratio": "16:9", "duration": 5},
"options": {"watermark_info": {"enabled": false}}
}'
終端機視窗bash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-3.0-turbo",
"contents": [{"type": "prompt", "text": "角色转身看向窗外"}, {"type": "first_frame", "url": "https://example.com/first.png"}],
"settings": {"resolution": "1080p", "duration": 5}
}'

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

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

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

媒體合約 · v1

合約 ID: media.kling-3-0-turbo.v1適配器: video.kling.turbo.v1@v1指紋: f7a701ee39bdcc6314f56777e8a6a52982a7bc918e4c9a2a00bf03435da425d3

官方來源: Kuaishou Kling

合約參數

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

支援的功能

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

結構化請求範例

text

意圖

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

提供者請求

{
  "contents": [
    {
      "text": "A red paper kite over a quiet harbour at dusk.",
      "type": "prompt"
    }
  ],
  "settings": {
    "aspect_ratio": "16:9",
    "duration": 3,
    "resolution": "720p"
  }
}

reference

意圖

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

提供者請求

{
  "contents": [
    {
      "text": "A red paper kite over a quiet harbour at dusk.",
      "type": "prompt"
    },
    {
      "type": "first_frame",
      "url": "https://example.com/reference.png"
    }
  ],
  "settings": {
    "aspect_ratio": "16:9",
    "duration": 3,
    "resolution": "720p"
  }
}