Stable Diffusion
  1. 企业计划
Stable Diffusion
  • Stable Diffusion API 文档
  • A1111 调度程序
  • Stable Diffusion API
    • 概述
    • 文本到图像
      POST
    • 图像到图像
      POST
    • 修复
      POST
    • 获取排队图像
      POST
    • 系统负载
      POST
  • 训练模型
    • 概述
    • Lora 模型
    • Dreambooth 模型 (V2)
    • Dreambooth 模型
    • 训练状态
    • 获取模型列表
    • 删除训练
    • 取消训练
    • 裁剪 Base64 图像
  • 文字转视频
    • 概述
    • 创建视频
    • 将文本训练为视频
  • 社区模型 API V4
    • 概述
    • 文本转图像
    • LoRA
    • LoRA 多功能设备
    • 图像到图像
    • 修复
    • 获取排队图像接口
    • 重新加载模型接口
  • 管理信息系统
    • 概述
    • 裁剪 Base64 图像
    • 删除图像
    • 获取训练过的模型列表
    • 获取公共型号列表
    • 清除用户缓存
    • 购买 Dreambooth 模型
    • 购买订阅计划
    • 取消订阅计划
    • NSFW 图像检查
    • 上传模型
    • 创建房间内部接口
  • 控制网
    • 概述
    • ControlNet 主要终端
    • ControlNet 多功能终端
  • 企业计划
    • 概述
    • 系统详情
      POST
    • 重新启动服务器终端
      POST
    • 更新服务器
      POST
    • 更新 S3 详细信息
      POST
    • 清楚缓存
      POST
    • 列表调度程序
      POST
    • 负载模型
      POST
    • 验证模型
      POST
    • 获取所有模型
      POST
    • 删除模型
      POST
    • Controlnet
      POST
    • 文字转图像
      POST
    • 文字转视频
      POST
    • 图像到图像
      POST
    • 修复
      POST
    • 超分辨率
      POST
    • 上传图片
      POST
    • 同步模型
      POST
    • 负载 Vae
      POST
    • NSFW 图像检查
      POST
    • 获取排队图像
      POST
  • Dreambooth 沙盒
    • 概述
    • 创建 Dreambooth 请求(沙盒)
    • 获取训练状态(沙盒)
  • 图像编辑
    • 概述
    • 外部绘画
    • Blip 扩散
    • 魔术混合接口
    • 图像深度
    • 图像混合器
    • 图像引导编辑
    • 删除背景
    • 超分辨率
    • 混合画布
  • 文本转 3D
    • 概述
    • 文本转 3D
    • 图像转 3D
  • 未经审查的聊天
    POST
  1. 企业计划

图像到图像

开发环境
https://stablediffusionapi.com/v1
开发环境
https://stablediffusionapi.com/v1
POST
https://stablediffusionapi.com/api/v1/enterprise/img2img
该接口用于根据经过训练或公共模型的图像生成图像。将适当的请求参数传递到端点以从图像生成图像。
与图像一起,您可以通过传递提示和否定提示来添加对所需结果的描述。
POST向 https://stablediffusionapi.com/api/v1/enterprise/img2img 接口发出请求,并将所需参数作为请求正文传递。
信息
要使用负载平衡器,您需要拥有1 台以上的服务器。传递第一台服务器的 API 密钥,它将处理与其他服务器的负载平衡。
该接口还支持调度程序。使用请求正文中的“scheduler”参数传递以下列表中的特定调度程序:
DDPMScheduler
DDIMScheduler
PNDMScheduler
LMSDiscreteScheduler
EulerDiscreteScheduler
EulerAncestralDiscreteScheduler
DPMSolverMultistepScheduler
HeunDiscreteScheduler
KDPM2DiscreteScheduler
DPMSolverSinglestepScheduler
KDPM2AncestralDiscreteScheduler
UniPCMultistepScheduler
DDIMInverseScheduler
DEISMultistepScheduler
IPNDMScheduler
KarrasVeScheduler
ScoreSdeVeScheduler
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://stablediffusionapi.com/api/v1/enterprise/img2img' \
--header 'Content-Type: application/json' \
--data-raw '{
  "key": "enterprise_api_key",
  "model_id": "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": "20",
  "safety_checker": "yes",
  "enhance_prompt": "yes",
  "guidance_scale": 7.5,
  "strength": 0.7,
  "scheduler": "DDPMScheduler",
  "lora_model": null,
  "tomesd": "yes",
  "use_karras_sigmas": "yes",
  "vae": null,
  "lora_strength": null,
  "embeddings_model": null,
  "seed": 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

示例

返回响应

🟢200成功
application/json
Body

修改于 2023-10-30 07:47:02
上一页
文字转视频
下一页
修复
Built with