{"openapi": "3.1.0", "info": {"title": "PraktickAI AI Runtime", "version": "1.0.0", "description": "Key-authenticated AI runtime (chat + email draft) for customer organizations"}, "paths": {"/api/ai/v1/chat/": {"post": {"operationId": "apps_console_api_ai_runtime_chat", "summary": "Chat", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AIResultOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}}, "tags": ["ai-runtime"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChatIn"}}}, "required": true}, "security": [{"ConsoleApiKeyAuth": []}]}}, "/api/ai/v1/email/draft/": {"post": {"operationId": "apps_console_api_ai_runtime_email_draft", "summary": "Email Draft", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EmailDraftResultOut"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorOut"}}}}}, "tags": ["ai-runtime"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/EmailDraftIn"}}}, "required": true}, "security": [{"ConsoleApiKeyAuth": []}]}}}, "components": {"schemas": {"AIResultOut": {"properties": {"output": {"title": "Output", "type": "string"}, "provider": {"title": "Provider", "type": "string"}}, "required": ["output", "provider"], "title": "AIResultOut", "type": "object"}, "ErrorOut": {"properties": {"detail": {"title": "Detail", "type": "string"}}, "required": ["detail"], "title": "ErrorOut", "type": "object"}, "ChatIn": {"properties": {"message": {"maxLength": 2000, "minLength": 1, "title": "Message", "type": "string"}}, "required": ["message"], "title": "ChatIn", "type": "object"}, "EmailDraftResultOut": {"properties": {"output": {"title": "Output", "type": "string"}, "provider": {"title": "Provider", "type": "string"}, "needs_escalation": {"default": false, "title": "Needs Escalation", "type": "boolean"}, "escalation_reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Escalation Reason"}}, "required": ["output", "provider"], "title": "EmailDraftResultOut", "type": "object"}, "EmailDraftIn": {"properties": {"customer_message": {"maxLength": 4000, "minLength": 1, "title": "Customer Message", "type": "string"}, "context": {"default": "", "maxLength": 4000, "title": "Context", "type": "string"}}, "required": ["customer_message"], "title": "EmailDraftIn", "type": "object"}}, "securitySchemes": {"ConsoleApiKeyAuth": {"type": "http", "scheme": "bearer"}}}, "servers": []}