House Design | Interior & Garden Design

House Design | Interior & Garden Design · GPT アクション

ControlNet API

API for controlling image generation with ControlNet, supporting image inpainting and detailed image adjustments.

  • POST /controlnetGenerate images using ControlNet
元の API スキーマ
{
  "openapi": "3.0.0",
  "info": {
    "title": "ControlNet API",
    "description": "API for controlling image generation with ControlNet, supporting image inpainting and detailed image adjustments.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://modelslab.com/api/v5",
      "description": "Main production server for ControlNet API"
    }
  ],
  "paths": {
    "/controlnet": {
      "post": {
        "operationId": "generateImage",
        "summary": "Generate images using ControlNet",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "API key for request authorization"
                  },
                  "model_id": {
                    "type": "string",
                    "description": "The ID of the model to be used, public or trained model"
                  },
                  "controlnet_model": {
                    "type": "string",
                    "description": "ControlNet model ID from models list or user trained"
                  },
                  "controlnet_type": {
                    "type": "string",
                    "description": "ControlNet model type from models list"
                  },
                  "prompt": {
                    "type": "string",
                    "description": "Detailed text prompt for image modifications"
                  },
                  "negative_prompt": {
                    "type": "string",
                    "description": "Describe what should not appear in the image"
                  },
                  "init_image": {
                    "type": "string",
                    "format": "uri",
                    "description": "URL to the initial image"
                  },
                  "width": {
                    "type": "integer",
                    "description": "Width of the generated image, maximum 1024"
                  },
                  "height": {
                    "type": "integer",
                    "description": "Height of the generated image, maximum 1024"
                  },
                  "scheduler": {
                    "type": "string",
                    "description": "Scheduler type"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Image generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "image_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}