{ "swagger": "2.0", "info": { "description": "API para analizar imagenes usando un proveedor de IA.", "title": "AI Image Analyzer API", "contact": {}, "version": "1.0" }, "basePath": "/", "paths": { "/api/analyze": { "post": { "description": "Recibe una imagen y devuelve etiquetas de contenido con su confianza.", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "analyze" ], "summary": "Analizar imagen", "parameters": [ { "type": "file", "description": "Archivo de imagen", "name": "image", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handler.AnalyzeResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handler.ErrorResponse" } }, "413": { "description": "Request Entity Too Large", "schema": { "$ref": "#/definitions/handler.ErrorResponse" } }, "415": { "description": "Unsupported Media Type", "schema": { "$ref": "#/definitions/handler.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handler.ErrorResponse" } }, "502": { "description": "Bad Gateway", "schema": { "$ref": "#/definitions/handler.ErrorResponse" } }, "504": { "description": "Gateway Timeout", "schema": { "$ref": "#/definitions/handler.ErrorResponse" } } } } } }, "definitions": { "entity.Tag": { "type": "object", "properties": { "confidence": { "type": "number" }, "label": { "type": "string" } } }, "handler.AnalyzeResponse": { "type": "object", "properties": { "tags": { "type": "array", "items": { "$ref": "#/definitions/entity.Tag" } } } }, "handler.ErrorResponse": { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" } } } } }