image_urls 即为纯文生图;传入参考图后,在 prompt 中用 @image_1、@image_2 … 引用。设置 mode=series 可生成一组前后连贯的图片。2k、4k 一般为 PNG,8k 为 JPEG。curl --location 'https://api.kie.ai/api/v1/jobs/createTask' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "kling-4-0/image",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"prompt": "A red apple on a white table, studio lighting, photorealistic",
"image_urls": [
"https://example.com/reference-1.png"
],
"mode": "default",
"resolution": "2k",
"aspect_ratio": "auto",
"count": 1
}
}'{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_kling-4-0_1765180000000"
}
}