文本转图像
开发环境
https://stablediffusionapi.com/v1
开发环境
https://stablediffusionapi.com/v1
POST
https://stablediffusionapi.com/api/v4/dreambooth
POST
向https://stablediffusionapi.com/api/v4/dreambooth端点发出请求,并将所需参数作为请求正文传递。提示
你也可以使用多个Lora模型。只需在请求体中以“more_details,animie”的形式将逗号分隔的Lora模型ID传递给lora_model即可
多语言支持
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://stablediffusionapi.com/api/v4/dreambooth' \
--header 'Content-Type: application/json' \
--data-raw '{
"key": "",
"model_id": "your_model_id",
"prompt": "ultra realistic close up portrait ((beautiful pale cyberpunk female with heavy black eyeliner)), blue eyes, shaved side haircut, hyper detail, cinematic lighting, magic neon, dark red city, Canon EOS R3, nikon, f/1.4, ISO 200, 1/160s, 8K, RAW, unedited, symmetrical balance, in-frame, 8K",
"negative_prompt": "",
"width": "512",
"height": "512",
"samples": "1",
"num_inference_steps": "30",
"safety_checker": "no",
"enhance_prompt": "yes",
"seed": null,
"guidance_scale": 7.5,
"multi_lingual": "no",
"panorama": "no",
"self_attention": "no",
"upscale": "no",
"embeddings_model": null,
"lora_model": null,
"tomesd": "yes",
"clip_skip": "2",
"use_karras_sigmas": "yes",
"vae": null,
"lora_strength": null,
"scheduler": "UniPCMultistepScheduler",
"webhook": null,
"track_id": null
}'
响应示例响应示例
{
"status": "string",
"generationTime": 0,
"id": 0,
"output": [
"string"
],
"meta": {
"prompt": "string",
"model_id": "string",
"negative_prompt": "string",
"scheduler": "string",
"safetychecker": "string",
"W": 0,
"H": 0,
"guidance_scale": 0,
"seed": 0,
"steps": 0,
"n_samples": 0,
"full_url": "string",
"upscale": "string",
"multi_lingual": "string",
"panorama": "string",
"self_attention": "string",
"embeddings": null,
"lora": null,
"outdir": "string",
"file_prefix": "string"
}
}
请求参数
Body 参数application/json