影片
kling-2.5-turbo API
透過 Modelflare 非同步視訊路由使用準確的 kling-2.5-turbo 模型 ID。
使用準確的型號 ID kling-2.5-turbo。模型欄位必須與此頁面完全相符。
參數: duration=5resolution=1080pratio=16:9
提示詞: One continuous take, no cuts. A night market grill under plastic awnings, skewers over coals. A cook in a lacquer-red jacket fans the fire once and the sparks refuse to die: they climb, gather and turn into a flock of small orange birds that wheels above the stalls and pours down the length of the street. The camera starts tight on the coals, pulls back and rises with the flock over the awnings. One hard warm key from the grill itself, cold blue street beyond. Real weight and inertia, smoke and heat shimmer, no text.
{ "model": "kling-2.5-turbo", "prompt": "One continuous take, no cuts. A night market grill under plastic awnings, skewers over coals. A cook in a lacquer-red jacket fans the fire once and the sparks refuse to die: they climb, gather and turn into a flock of small orange birds that wheels above the stalls and pours down the length of the street. The camera starts tight on the coals, pulls back and rises with the flock over the awnings. One hard warm key from the grill itself, cold blue street beyond. Real weight and inertia, smoke and heat shimmer, no text.", "seconds": "5", "duration": 5, "resolution": "1080p", "ratio": "16:9", "aspect_ratio": "16:9"}身份驗證與端點
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_name": "kling-2.5-turbo", "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 可能會過期,因此請立即傳輸檔案。
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 Legacy 使用 model_name 和 text2video / image2video 請求結構。查看此型號的官方頁面和定價頁面,以了解模式、解析度和音訊通道。
| 場 | 必填 | 註釋 |
|---|---|---|
model_name |
是 | kling-2.5-turbo |
prompt |
有條件 | 文字轉視頻所需;與影像結合以進行影像轉視頻 |
image |
有條件 | 第一格圖片 URL 或 Base64 |
image_tail |
否 | 可選的結束影格影像 |
video_url |
有條件 | Kling 3.0運動控制參考視頻 |
image_list |
否 | Omni/O1 與多模式工作流程的圖片列表 |
negative_prompt |
否 | 負面提示 |
mode |
否 | std / pro / 4k(取決於型號) |
duration |
否 | 5 / 10(字符串) |
multi_shot |
否 | 啟用多鏡頭故事板 |
sound |
否 | 在支援的情況下產生同步聲音 |
camera_control |
否 | 支援的相機控制 |
輸入與輸出限制
Section titled “輸入與輸出限制”Kling 2.5 Turbo 使用具有固定 5/10 秒持續時間和 720p/1080p 的 Legacy API。它支援文字轉視頻和單首幀圖像轉視頻,但不支援本機音頻、語音、連拍、運動畫筆或相機控制。
記錄的工作流程範例
Section titled “記錄的工作流程範例”舊模型按工作流程選擇 model_name、第一幀/結束幀或運動控製欄位;固定的持續時間和音訊限制遵循本頁的表格。
curl https://modelflare.dev/v1/videos \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model_name": "kling-2.5-turbo", "prompt": "一只狗在海边奔跑", "duration": "5", "mode": "pro", "aspect_ratio": "16:9", "sound": "off" }'錯誤與失敗的任務
Section titled “錯誤與失敗的任務”無效模型參數傳回帶有請求 ID 的 4xx。非同步任務建立成功後也可能進入失敗;使用輪詢回應中的 error_code 和 error_message 作為最終任務原因。不要使用不同的 JSON 形狀重試相同的請求。
此頁面涵蓋 Modelflare 模型產生和編輯呼叫。搜尋或地圖豐富、語音管理和元素庫管理是此公共模型呼叫表面之外的資源 API,並且不是必需的請求欄位。
此模型採用按秒視訊計費。請參閱 型號定價頁面 ,以了解當前客戶價格、參考標價和完整規格。
媒體合約 · v1
官方來源: Kuaishou Kling
合約參數
| 意圖字段 | 控制項 | 選項 |
|---|---|---|
ratio | select | 16:9 / 9:16 / 1:1 |
resolution | select | 720p / 1080p |
duration | select | 5 / 10 |
支援的功能
allowed_values·ratio· 16:9, 9:16, 1:1allowed_values·resolution· 720p, 1080pallowed_values·duration· 5, 10max_assets·reference_asset_ids· 2
結構化請求範例
text
意圖
{
"duration": 5,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"resolution": "720p"
}提供者請求
{
"aspect_ratio": "16:9",
"duration": "5",
"mode": "std",
"model_name": "kling-2.5-turbo",
"prompt": "A red paper kite over a quiet harbour at dusk."
}reference
意圖
{
"duration": 5,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"resolution": "720p"
}提供者請求
{
"aspect_ratio": "16:9",
"duration": "5",
"image": "https://example.com/reference.png",
"mode": "std",
"model_name": "kling-2.5-turbo",
"prompt": "A red paper kite over a quiet harbour at dusk."
}