单张图片
对于支持以图生图的模型,你可以通过传入图片链接进行以图生图,具体的使用方法如下:复制
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
"model":"kling-image-v1-5",
"prompt":"修复这张破损的照片",
"image":"https://static.geekai.co/storage/2025/04/02/broken-picture.jpg"
}'
多张图片
多张图片以图片链接列表形式传递image 参数即可:
复制
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
"model": "gpt-image-1",
"prompt": "将第一张图中的面料应用至第二张图的服装上,图片比例按照第二张图的来",
"image": [
"https://style3d-render.oss-cn-hangzhou.aliyuncs.com/test/针织.jpg",
"https://style3d-render.oss-cn-hangzhou.aliyuncs.com/test/款式图.jpg"
]
}'
