Commit 247aeb3a authored by Ryan Voots's avatar Ryan Voots Committed by AUTOMATIC1111

Put API under /sdapi/ so that routing is simpler in the future. This means...

Put API under /sdapi/ so that routing is simpler in the future.  This means that one could allow access to /sdapi/ but not the webui.
parent c3851a85
......@@ -18,7 +18,7 @@ class TextToImageResponse(BaseModel):
class Api:
def __init__(self, app):
self.router = APIRouter()
app.add_api_route("/v1/txt2img", self.text2imgapi, methods=["POST"])
app.add_api_route("/sdapi/v1/txt2img", self.text2imgapi, methods=["POST"])
def text2imgapi(self, txt2imgreq: StableDiffusionProcessingAPI ):
populate = txt2imgreq.copy(update={ # Override __init__ params
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment