diff --git a/swagger/docs.go b/swagger/docs.go index 9d18a7246de8..5b3e93c9c2c1 100644 --- a/swagger/docs.go +++ b/swagger/docs.go @@ -634,6 +634,83 @@ const docTemplate = `{ } } }, + "/v1/images/inpainting": { + "post": { + "description": "Perform image inpainting. Accepts multipart/form-data with ` + "`" + `image` + "`" + ` and ` + "`" + `mask` + "`" + ` files.", + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "images" + ], + "summary": "Image inpainting", + "parameters": [ + { + "type": "string", + "description": "Model identifier", + "name": "model", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "Text prompt guiding the generation", + "name": "prompt", + "in": "formData", + "required": true + }, + { + "type": "integer", + "description": "Number of inference steps (default 25)", + "name": "steps", + "in": "formData" + }, + { + "type": "file", + "description": "Original image file", + "name": "image", + "in": "formData", + "required": true + }, + { + "type": "file", + "description": "Mask image file (white = area to inpaint)", + "name": "mask", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/schema.OpenAIResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, "/v1/mcp/chat/completions": { "post": { "summary": "Stream MCP chat completions with reasoning, tool calls, and results", diff --git a/swagger/swagger.json b/swagger/swagger.json index ed6ddb77de8a..858e3ef7f26f 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -627,6 +627,83 @@ } } }, + "/v1/images/inpainting": { + "post": { + "description": "Perform image inpainting. Accepts multipart/form-data with `image` and `mask` files.", + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "images" + ], + "summary": "Image inpainting", + "parameters": [ + { + "type": "string", + "description": "Model identifier", + "name": "model", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "Text prompt guiding the generation", + "name": "prompt", + "in": "formData", + "required": true + }, + { + "type": "integer", + "description": "Number of inference steps (default 25)", + "name": "steps", + "in": "formData" + }, + { + "type": "file", + "description": "Original image file", + "name": "image", + "in": "formData", + "required": true + }, + { + "type": "file", + "description": "Mask image file (white = area to inpaint)", + "name": "mask", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/schema.OpenAIResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, "/v1/mcp/chat/completions": { "post": { "summary": "Stream MCP chat completions with reasoning, tool calls, and results", diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 209af52d637f..db1c3a75cd16 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -1201,43 +1201,55 @@ paths: post: consumes: - multipart/form-data - - application/json + description: Perform image inpainting. Accepts multipart/form-data with `image` + and `mask` files. parameters: - - in: formData + - description: Model identifier + in: formData name: model - type: string - description: Model name (eg. dreamshaper-8-inpainting) required: true - - in: formData - name: prompt type: string - description: Positive prompt text + - description: Text prompt guiding the generation + in: formData + name: prompt required: true - - in: formData + type: string + - description: Number of inference steps (default 25) + in: formData + name: steps + type: integer + - description: Original image file + in: formData name: image - type: file - description: Source image (PNG/JPEG) required: true - - in: formData - name: mask type: file - description: Mask image (PNG). White=keep, Black=replace (or as backend expects) + - description: Mask image file (white = area to inpaint) + in: formData + name: mask required: true - - in: formData - name: steps - type: integer - description: Number of inference steps - - in: body - name: request - description: "Alternative JSON payload with base64 fields: { image: '', mask: '', model, prompt }" - schema: - $ref: '#/definitions/schema.OpenAIRequest' + type: file + produces: + - application/json responses: "200": - description: Successful inpainting + description: OK schema: $ref: '#/definitions/schema.OpenAIResponse' - summary: Creates an inpainted image given an image + mask + prompt. + "400": + description: Bad Request + schema: + additionalProperties: + type: string + type: object + "500": + description: Internal Server Error + schema: + additionalProperties: + type: string + type: object + summary: Image inpainting + tags: + - images /v1/mcp/chat/completions: post: parameters: