Comment on page
图像生成
GET https://p0.kamiya.dev/api/image/config
POST https://p0.kamiya.dev/api/image/generate
请求 示例
{
"type": "text2image", //image2image
"prompts": "礼花,气球,红色瞳孔,小巷,看着观众,城市,浮世绘,头发飘起,",
"negativePrompts": "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry",
"step": 28,
"cfg": 12,
"seed": 218506577,
"sampling": "DPM++ 2M Karras",
"width": 768,
"height": 512,
"model": "original", //模型配置见Config
"LoRAs": [ //LoRA配置见Config
{
"id": "bocchiEdStyleLora_bocchiEdStyle",
"weight": 60
}
],
"image": "<base64 url>" //在type为image2image时传递
}
响应示例
{
"status": 200,
"message": "OK",
"data": {
"id": "w1tjx7j",
"hashid": "nqy1zenwuykr256",
"metaid": "dc9d09c889017a0538ccad375339c275",
"status": "created",
"metadata": {
"LoRAs": [],
"model": "original",
"width": 768,
"height": 512,
"type": "text2image",
"prompts": "礼花,气球,红色瞳孔,小巷,看着观众,城市,浮世绘,头发飘起,",
"negativePrompts": "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry,lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry",
"sampling": "DPM++ 2M Karras",
"step": 28,
"cfg": 12,
"seed": 218506577,
"batch": 1,
"artboard": "768x512"
},
"userId": 2,
"createdAt": "08-06 07:30:20",
"updatedAt": "08-06 07:30:20"
}
}
根据上面API返回的
data