多图生图
使用 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 - 将其视为异步生成路由,并保存返回的任务 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.