影片
kling-3.0 API
透過 Modelflare 非同步視訊路由使用準確的 kling-3.0 模型 ID。
使用準確的型號 ID kling-3.0。模型欄位必須與此頁面完全相符。
參數: duration=5resolution=1080pratio=16:9
提示詞: Stop-motion claymation style: a small orange clay fox sneaks through a miniature felt forest, pauses, sniffs a glowing mushroom and jumps back in surprise. Handmade textures, visible fingerprints on the clay, soft tabletop lighting, charming and playful, no text.
{ "model": "kling-3.0", "prompt": "Stop-motion claymation style: a small orange clay fox sneaks through a miniature felt forest, pauses, sniffs a glowing mushroom and jumps back in surprise. Handmade textures, visible fingerprints on the clay, soft tabletop lighting, charming and playful, 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-3.0", "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-3.0 |
prompt |
有條件 | 文字轉視頻所需;與影像結合以進行影像轉視頻 |
image |
有條件 | 第一格圖片 URL 或 Base64 |
image_tail |
否 | 可選的結束影格影像 |
video_url |
有條件 | Kling 3.0運動控制參考視頻 |
image_list |
否 | Omni/O1 與多模式工作流程的圖片列表 |
negative_prompt |
否 | 負面提示 |
mode |
否 | std / pro / 4k(取決於型號) |
duration |
否 | 3–15 秒(字串) |
multi_shot |
否 | 啟用多鏡頭故事板 |
sound |
否 | 在支援的情況下產生同步聲音 |
camera_control |
否 | 支援的相機控制 |
輸入與輸出限制
Section titled “輸入與輸出限制”Kling Legacy 請求使用 model_name; mode、duration、image/image_tail、sound 和 camera_control 是否可用取決於型號。最短計費秒數和解析度通道遵循定價頁面上每個型號的行。
記錄的工作流程範例
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-3.0", "prompt": "转移动作并保持人物身份", "image": "https://example.com/character.png", "video_url": "https://example.com/motion.mp4", "duration": "5", "mode": "std" }'錯誤與失敗的任務
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 / 4k |
duration | select | 3 / 5 / 8 / 10 / 15 |
audio | switch | — |
支援的功能
allowed_values·ratio· 16:9, 9:16, 1:1allowed_values·resolution· 720p, 1080p, 4kallowed_values·duration· 3, 5, 8, 10, 15max_assets·reference_asset_ids· 2
結構化請求範例
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-3.0",
"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": "https://example.com/reference.png",
"mode": "std",
"model_name": "kling-3.0",
"prompt": "A red paper kite over a quiet harbour at dusk.",
"sound": "off"
}