套用 Kling 影片特效
透過 CometAPI 使用 Kling Video Effects API,以 POST /kling/v1/videos/effects 對影片套用風格化特效並控制特效參數。
選擇特效場景
- 單張圖片特效使用
effect_scene搭配input.image與input.duration - 雙人互動特效使用
effect_scene搭配input.images,且必須剛好提供兩張圖片 - 輸入圖片必須符合 Kling 的像素要求;過小的縮圖會被生成任務拒絕
- 確切的素材格式取決於所選特效,但請求一律會將特效設定包在
input內 - 請使用目前 Kling 可用的特效場景;CometAPI 會拒絕未知的
effect_scene值 - 避免依賴固定的公開 enum 清單;特效可用性會隨 model track 與場景家族而變動
任務流程
提交特效請求
effect_scene 與相對應的 input 物件,並儲存回傳的 task id。輪詢任務
保存最終素材
授權
Bearer token authentication. Use your CometAPI key.
主體
Kling preset effect scene. Single-image effects use input.image; two-person interaction effects use input.images with exactly two images.
Effect-specific input payload. Single-image scenes require image and duration; two-person interaction scenes require exactly two images and duration.
- Single-image effect input
- Two-person interaction effect input
Webhook URL for task status notifications. The server sends a callback when the task status changes.
Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.