aboutsummaryrefslogtreecommitdiff
path: root/modules/api/models.py
diff options
context:
space:
mode:
authorBruno Seoane <brunoseoaneamarillo@gmail.com>2022-10-23 13:07:59 -0300
committerBruno Seoane <brunoseoaneamarillo@gmail.com>2022-10-23 13:07:59 -0300
commit4ff852ffb50859f2eae75375cab94dd790a46886 (patch)
treefc2688a6b284d42d64efb8918769bb6d10aa7a03 /modules/api/models.py
parent0523704dade0508bf3ae0c8cb799b1ae332d449b (diff)
Add batch processing "extras" endpoint
Diffstat (limited to 'modules/api/models.py')
-rw-r--r--modules/api/models.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/modules/api/models.py b/modules/api/models.py
index dcf1ab54..bbd0ef53 100644
--- a/modules/api/models.py
+++ b/modules/api/models.py
@@ -29,4 +29,17 @@ class ExtrasSingleImageRequest(ExtrasBaseRequest):
image: str = Field(default="", title="Image", description="Image to work on, must be a Base64 string containing the image's data.")
class ExtrasSingleImageResponse(ExtraBaseResponse):
- image: str = Field(default=None, title="Image", description="The generated image in base64 format.") \ No newline at end of file
+ image: str = Field(default=None, title="Image", description="The generated image in base64 format.")
+
+class SerializableImage(BaseModel):
+ path: str = Field(title="Path", description="The image's path ()")
+
+class ImageItem(BaseModel):
+ data: str = Field(title="image data")
+ name: str = Field(title="filename")
+
+class ExtrasBatchImagesRequest(ExtrasBaseRequest):
+ imageList: list[str] = Field(title="Images", description="List of images to work on. Must be Base64 strings")
+
+class ExtrasBatchImagesResponse(ExtraBaseResponse):
+ images: list[str] = Field(title="Images", description="The generated images in base64 format.") \ No newline at end of file