多圖生圖
使用 CometAPI 的 Kling 多圖生圖端點,透過簡單的 POST 請求與彈性的 Content-Type,從多個輸入產生新圖片。
當你希望 Kling 根據多個主體參考圖,再加上可選的場景或風格參考圖,生成一張圖片時,請使用此端點。Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
呼叫前須知
- 在
subject_image_list中提供 2 到 4 張圖片 - 使用
model_name: kling-v2 - 僅在核心主體構圖已經可用時,才加入
scence_image或style_image - 將此視為非同步生成路由,並保存回傳的 task id
任務流程
輪詢任務
授權
Bearer token authentication. Use your CometAPI key.
標頭
Content type of the request body.
主體
Kling Image Generation API request body definition
List of subject reference images. Minimum 2, maximum 4.
Model to use for multi-image generation.
kling-v2 Text prompt describing the desired output. Max 2500 characters.
Optional scene reference image. Same format and size constraints as subject images.
Optional style reference image. Same format and size constraints as subject images.
Number of images to generate.
Aspect ratio of the generated image (width:height).
16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9 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.