{ "openapi": "3.1.0", "info": { "title": "AI Service", "version": "0.1.0" }, "paths": { "/ai/generate": { "post": { "summary": "Generate Ai Response", "description": "Generate an AI response based on user input.", "operationId": "generate_ai_response_ai_generate_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/health": { "get": { "summary": "Health", "description": "Health check endpoint.", "operationId": "health_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Response Health Health Get" } } } } } } } }, "components": { "schemas": { "AIRequest": { "properties": { "user_input": { "type": "string", "title": "User Input", "description": "User-provided input text" }, "system_prompt": { "type": "string", "title": "System Prompt", "description": "System prompt guiding AI behavior" }, "response_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Response Schema", "description": "Optional JSON schema requesting structured output" } }, "type": "object", "required": [ "user_input", "system_prompt" ], "title": "AIRequest", "description": "Request model for AI generation." }, "AIResponse": { "properties": { "result": { "anyOf": [ { "type": "string" }, { "additionalProperties": true, "type": "object" } ], "title": "Result", "description": "AI-generated response (string or structured data)" } }, "type": "object", "required": [ "result" ], "title": "AIResponse", "description": "Response model for AI generation." }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" } } } }