图像到图像
开发环境
开发环境
POST
https://stablediffusionapi.com/api/v3/img2img
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://stablediffusionapi.com/api/v3/img2img?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues' \
--data-raw '{
"key": "",
"prompt": "a cat sitting on a bench",
"negative_prompt": null,
"init_image": "https://raw.githubusercontent.com/CompVis/stable-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png",
"width": "512",
"height": "512",
"samples": "1",
"num_inference_steps": "30",
"safety_checker": "no",
"enhance_prompt": "yes",
"guidance_scale": 7.5,
"strength": 0.7,
"seed": null,
"webhook": null,
"track_id": null
}'
响应示例响应示例
{
"status": "string",
"generationTime": 0,
"id": 0,
"output": [
"string"
],
"meta": {
"H": 0,
"W": 0,
"enable_attention_slicing": "string",
"file_prefix": "string",
"guidance_scale": 0,
"model": "string",
"n_samples": 0,
"negative_prompt": "string",
"outdir": "string",
"prompt": "string",
"revision": "string",
"safety_checker": "string",
"seed": 0,
"steps": 0,
"vae": "string"
}
}
请求参数
Body 参数application/json
返回响应
修改于 2023-10-30 03:15:28