从多张图片生成 Kling 图像
使用 CometAPI 的 Kling 多图生图端点,基于主体、场景和风格图片参考生成一张新图像。
调用前准备
- 在
subject_image_list中提供 1 到 4 张图片 - 新请求使用
model_name: kling-v2-1 - 仅当核心主体构图已满足需求时,再添加
scene_image或style_image - 将其视为异步生成路由,并保存返回的任务 id
任务流程
提交图像生成任务
轮询任务
持久化结果
授权
Bearer token authentication. Use your CometAPI key.
请求头
Must be application/json.
请求体
Subject reference images. Minimum 1, maximum 4.
1 - 4 elementsModel to use for multi-image generation. Use kling-v2-1 for new requests; omitting the field uses the legacy route default.
kling-v2, kling-v2-1 Text prompt describing the desired output. Maximum 2500 characters.
Elements to exclude from the image. Maximum 2500 characters.
Optional scene reference image. Image URL or raw Base64 string without a data: prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1.
Optional style reference image. Image URL or raw Base64 string without a data: prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1.
Number of images to generate. Range: 1-9.
1 <= x <= 9Aspect ratio of the generated image.
16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9 Watermark options.
Webhook URL for task status notifications.
Optional user-defined task ID for your own tracking. Must be unique per account.