图像到图像
开发环境
https://stablediffusionapi.com/v1
开发环境
https://stablediffusionapi.com/v1
POST
https://stablediffusionapi.com/api/v4/dreambooth/img2img
POST
向https://stablediffusionapi.com/api/v4/dreambooth/img2img端点发出请求,并将所需参数作为请求正文传递到端点。请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://stablediffusionapi.com/api/v4/dreambooth/img2img' \
--header 'Content-Type: application/json' \
--data-raw '{
"key": "",
"model_id": "your_model_id",
"prompt": "papercraft, quilling, layers, landscape",
"negative_prompt": null,
"init_image": "https://pub-8b49af329fae499aa563997f5d4068a4.r2.dev/generations/d8cd0add-8cd7-40a4-802b-7b80be45a14c-0.png",
"width": "512",
"height": "512",
"samples": "1",
"num_inference_steps": "30",
"safety_checker": "yes",
"enhance_prompt": "yes",
"guidance_scale": 7.5,
"strength": 0.7,
"scheduler": "UniPCMultistepScheduler",
"seed": null,
"lora_model": null,
"tomesd": "yes",
"use_karras_sigmas": "yes",
"vae": null,
"lora_strength": null,
"embeddings_model": null,
"webhook": null,
"track_id": null
}'
响应示例响应示例
{
"status": "string",
"generationTime": 0,
"id": 0,
"output": [
"string"
],
"meta": {
"prompt": "string",
"model_id": "string",
"scheduler": "string",
"safetychecker": "string",
"negative_prompt": "string",
"W": 0,
"H": 0,
"guidance_scale": 0,
"init_image": "string",
"steps": 0,
"n_samples": 0,
"strength": 0,
"multi_lingual": "string",
"full_url": "string",
"upscale": "string",
"seed": 0,
"outdir": "string",
"file_prefix": "string"
}
}
请求参数
Body 参数application/json