Skip to main content
POST
cURL
當單一來源圖片不足以滿足需求,而你希望 Kling 根據多張圖片參考建立動作時,請使用此端點。

呼叫前準備

  • image_list 中準備 1 到 4 張圖片
  • 使用符合 Kling 像素要求的圖片;過小的縮圖會被生成任務拒絕
  • 除非你明確需要選擇與路由相容的模型,否則請省略 model_name
  • 第一次測試請保持簡單:簡短的 prompt、duration: 5,且不要加入額外的 callback 設定
  • 請勿在此路由上傳送 image-to-video 的遮罩欄位,例如 static_maskdynamic_masks

任務流程

1

提交多圖請求

傳送圖片清單、prompt 和 duration,然後保存回傳的 Kling task_id
2

輪詢任務

持續使用 取得 Kling 任務,直到任務進入最終狀態。
3

保存結果

如果你需要在供應商提供的交付 URL 之外保留結果,請儲存已完成的影片。
如需完整的參數參考,請參閱官方 Kling 文件

授權

Authorization
string
header
必填

Bearer token authentication. Use your CometAPI key.

主體

application/json
image_list
object[]
必填

Input image references. Provide 1 to 4 items that meet Kling pixel requirements; very small thumbnails are rejected.

Required array length: 1 - 4 elements
model_name
enum<string>
預設值:kling-v1-6

Kling model variant for multi-image video. Omit to use kling-v1-6.

可用選項:
kling-v1-6
prompt
string

Text prompt describing the desired motion and scene.

negative_prompt
string

Elements to avoid in the generated video.

mode
enum<string>
預設值:std

Generation mode. Use std or pro; omitted requests use std.

可用選項:
std,
pro
duration
string
預設值:5

Output video length in seconds. Use 5 or 10; omitted requests use 5.

aspect_ratio
enum<string>

Requested frame aspect ratio when the model needs an explicit frame shape.

可用選項:
16:9,
9:16,
1:1
callback_url
string

Webhook URL to receive task status updates.

external_task_id
string

Custom task id for your own tracking. Must be unique per account.

回應

200 - application/json

Task accepted.

code
integer
必填

Error code; specifically define the error code

message
string
必填

error message

data
object
必填