{"application":{"name":"AI Chat Hub API","version":"1.0.0","description":"Comprehensive API for AI-powered chat, document processing, and tool management","environment":"development"},"server":{"baseUrl":"/api/v1","status":"healthy"},"endpoints":{"authentication":{"path":"/api/v1/auth","methods":["POST"],"description":"User authentication and token management","endpoints":[{"method":"POST","path":"/auth/login","description":"Authenticate user login with email and password. Returns authentication tokens for API access.","parameters":[{"name":"email","type":"string","description":"User's email address for authentication"},{"name":"password","type":"string","description":"User's password for authentication"},{"name":"remember","type":"boolean","description":"Flag to indicate if the login session should be remembered"}],"responses":[{"code":200,"description":"Login successful","schema":{"token":"string","refreshToken":"string","expires":"string"}},{"code":400,"description":"Validation error","schema":{"error":"string","message":"string","code":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/auth/register","description":"Register a new user account with email and password.","parameters":[{"name":"email","type":"string","description":"Email address for the new user account"},{"name":"password","type":"string","description":"Password for the new user account"}],"responses":[{"code":200,"description":"User registered successfully","schema":{"status":"string","message":"string"}},{"code":400,"description":"Validation error","schema":{"error":"string","message":"string","code":"string"}},{"code":409,"description":"User already exists","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/auth/refresh","description":"Refresh an expired access token using a refresh token.","parameters":[{"name":"refreshToken","type":"string","description":"Valid refresh token to obtain a new access token"}],"responses":[{"code":200,"description":"Token refreshed successfully","schema":{"token":"string"}},{"code":400,"description":"Validation error","schema":{"error":"string","message":"string","code":"string"}},{"code":401,"description":"Token refresh failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]}]},"chat":{"path":"/api/v1/chat","methods":["GET","POST","DELETE"],"description":"AI chat interactions, document/website attachments, and function integration","endpoints":[{"method":"GET","path":"/chat/clear","description":"Clear the current chat session from memory.","parameters":[],"responses":[{"code":200,"description":"Conversation memory cleared successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/chat/memory","description":"Retrieve the current chat history from memory.","parameters":[],"responses":[{"code":200,"description":"Conversation memory retrieved successfully","schema":{"type":"array","items":{"role":"string","content":"string","timestamp":"string"}}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/chat/question","description":"Send a text question to the AI model and receive a response.","parameters":[{"name":"question","type":"string","description":"The text question to send to the AI model"},{"name":"role","type":"string","description":"The role for the message (user, system, assistant)"},{"name":"model","type":"string","description":"The AI model to use for processing the question"},{"name":"engine","type":"string","description":"The AI platform/engine to use for processing"}],"responses":[{"code":200,"description":"Chat response received successfully","schema":{"role":"string","content":"string"}},{"code":400,"description":"Validation error","schema":{"error":"string","message":"string","code":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/chat/summary","description":"Generate a summary of the current chat session using an AI model.","parameters":[{"name":"model","type":"string","description":"The AI model to use for generating the summary"},{"name":"engine","type":"string","description":"The AI platform/engine to use for processing"}],"responses":[{"code":200,"description":"Conversation summary generated successfully","schema":{"role":"string","content":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/chat/image","description":"Generate an image based on a text prompt using AI image generation models.","parameters":[{"name":"prompt","type":"string","description":"Text prompt describing the image to generate"},{"name":"model","type":"string","description":"The AI image generation model to use"},{"name":"platform","type":"string","description":"The AI platform to use for image generation"}],"responses":[{"code":200,"description":"Image generated successfully","schema":{"role":"string","content":"string"}},{"code":400,"description":"Validation error","schema":{"error":"string","message":"string","code":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/chat/question/document/full","description":"Ask a question about attached documents using full document context.","parameters":[{"name":"historyId","type":"string","description":"ID of the chat history session"},{"name":"question","type":"string","description":"The question to ask about the documents"},{"name":"model","type":"string","description":"The AI model to use for processing"},{"name":"role","type":"string","description":"The role for the message"},{"name":"platform","type":"string","description":"The AI platform to use for processing"}],"responses":[{"code":200,"description":"Document chat response received successfully","schema":{"role":"string","content":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/chat/question/document/rag","description":"Ask a question about attached documents using Retrieval Augmented Generation (RAG).","parameters":[{"name":"historyId","type":"string","description":"ID of the chat history session"},{"name":"question","type":"string","description":"The question to ask about the documents"},{"name":"role","type":"string","description":"The role for the message"},{"name":"model","type":"string","description":"The AI model to use for processing"},{"name":"engine","type":"string","description":"The AI platform/engine to use for processing"},{"name":"limit","type":"integer","description":"Maximum number of document chunks to retrieve"},{"name":"postFilter","type":"string","description":"Flag to apply post-processing filtering to results"}],"responses":[{"code":200,"description":"RAG document search response received successfully","schema":{"role":"string","content":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/chat/attach/document","description":"Attach a document to the current chat session.","parameters":[{"name":"documentId","type":"string","description":"ID of the document to attach"},{"name":"historyId","type":"string","description":"ID of the chat history session"}],"responses":[{"code":200,"description":"Document attached successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/chat/attach/document/:historyId","description":"Get all documents attached to a specific chat session.","parameters":[],"responses":[{"code":200,"description":"Attached documents retrieved successfully","schema":{"type":"array","items":{"id":"string","title":"string","short":"string"}}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"DELETE","path":"/chat/attach/document","description":"Remove a document attachment from a chat session.","parameters":[{"name":"documentId","type":"string","description":"ID of the document to remove"},{"name":"historyId","type":"string","description":"ID of the chat history session"}],"responses":[{"code":200,"description":"Document attachment removed successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/chat/question/website/full","description":"Ask a question about attached websites using full website context.","parameters":[{"name":"historyId","type":"string","description":"ID of the chat history session"},{"name":"question","type":"string","description":"The question to ask about the websites"},{"name":"model","type":"string","description":"The AI model to use for processing"},{"name":"role","type":"string","description":"The role for the message"},{"name":"platform","type":"string","description":"The AI platform to use for processing"}],"responses":[{"code":200,"description":"Website chat response received successfully","schema":{"role":"string","content":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/chat/question/website/rag","description":"Ask a question about attached websites using Retrieval Augmented Generation (RAG).","parameters":[{"name":"historyId","type":"string","description":"ID of the chat history session"},{"name":"question","type":"string","description":"The question to ask about the websites"},{"name":"role","type":"string","description":"The role for the message"},{"name":"model","type":"string","description":"The AI model to use for processing"},{"name":"engine","type":"string","description":"The AI platform/engine to use for processing"},{"name":"limit","type":"integer","description":"Maximum number of website chunks to retrieve"},{"name":"postFilter","type":"string","description":"Flag to apply post-processing filtering to results"}],"responses":[{"code":200,"description":"RAG website search response received successfully","schema":{"role":"string","content":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/chat/attach/website","description":"Attach a website to the current chat session.","parameters":[{"name":"websiteId","type":"string","description":"ID of the website to attach"},{"name":"historyId","type":"string","description":"ID of the chat history session"}],"responses":[{"code":200,"description":"Website attached successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/chat/attach/website/:historyId","description":"Get all websites attached to a specific chat session.","parameters":[],"responses":[{"code":200,"description":"Attached websites retrieved successfully","schema":{"type":"array","items":{"id":"string","title":"string","short":"string"}}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"DELETE","path":"/chat/attach/website","description":"Remove a website attachment from a chat session.","parameters":[{"name":"websiteId","type":"string","description":"ID of the website to remove"},{"name":"historyId","type":"string","description":"ID of the chat history session"}],"responses":[{"code":200,"description":"Website attachment removed successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/chat/question/functions","description":"Ask a question that can be processed using custom functions/tools.","parameters":[{"name":"question","type":"string","description":"The question that may require function execution"},{"name":"role","type":"string","description":"The role for the message"},{"name":"model","type":"string","description":"The AI model to use for processing"},{"name":"functionModel","type":"string","description":"The model to use for function processing"},{"name":"platform","type":"string","description":"The AI platform to use for processing"},{"name":"historyId","type":"string","description":"ID of the chat history session"}],"responses":[{"code":200,"description":"Function chat response received successfully","schema":{"role":"string","content":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/chat/attach/function","description":"Attach a custom function to the current chat session.","parameters":[{"name":"historyId","type":"string","description":"ID of the chat history session"},{"name":"functionId","type":"string","description":"ID of the function to attach"}],"responses":[{"code":200,"description":"Function attached successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/chat/attach/function/:historyId","description":"Get all functions attached to a specific chat session.","parameters":[],"responses":[{"code":200,"description":"Attached functions retrieved successfully","schema":{"type":"array","items":{"id":"string","name":"string","short":"string"}}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"DELETE","path":"/chat/attach/function","description":"Remove a function attachment from a chat session.","parameters":[{"name":"functionId","type":"string","description":"ID of the function to remove"},{"name":"historyId","type":"string","description":"ID of the chat history session"}],"responses":[{"code":200,"description":"Function attachment removed successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]}]},"documents":{"path":"/api/v1/document","methods":["GET","POST","PUT","DELETE"],"description":"Document upload, processing, transformation, and embedding","endpoints":[{"method":"POST","path":"/document/transform","description":"Transform a document into chunks for processing and embedding.","parameters":[{"name":"id","type":"string","description":"ID of the document to transform"},{"name":"model","type":"string","description":"AI model to use for document processing"},{"name":"platform","type":"string","description":"AI platform to use for document processing"},{"name":"transType","type":"string","description":"Type of transformation to apply"},{"name":"chunkSize","type":"integer","description":"Size of each text chunk"},{"name":"chunkOverlap","type":"integer","description":"Overlap between consecutive chunks"},{"name":"chunkSplitterType","type":"string","description":"Type of splitter to use for chunking"},{"name":"paraMinSize","type":"integer","description":"Minimum size of paragraphs"},{"name":"paraMaxSize","type":"integer","description":"Maximum size of paragraphs"},{"name":"paraOverlap","type":"integer","description":"Overlap between paragraphs"},{"name":"split1","type":"string","description":"First custom split pattern"},{"name":"split2","type":"string","description":"Second custom split pattern"}],"responses":[{"code":200,"description":"Document transformed successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/document/embed","description":"Create vector embeddings for a document using AI models.","parameters":[{"name":"id","type":"string","description":"ID of the document to embed"},{"name":"model","type":"string","description":"AI model to use for creating embeddings"},{"name":"platform","type":"string","description":"AI platform to use for creating embeddings"},{"name":"contextSize","type":"integer","description":"Size of the context window for embedding"}],"responses":[{"code":200,"description":"Document embedded successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/document/embed/search","description":"Search document embeddings using a text query.","parameters":[{"name":"id","type":"string","description":"ID of the document to search within"},{"name":"queryText","type":"string","description":"Text query to search for in embeddings"},{"name":"limit","type":"integer","description":"Maximum number of results to return"},{"name":"postFilter","type":"string","description":"Flag to apply post-processing filtering to results"}],"responses":[{"code":200,"description":"Document search completed successfully","schema":{"type":"array","items":{"id":"string","content":"string","similarity":"number"}}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/document/transform/:id","description":"Get the transformation details for a specific document.","parameters":[],"responses":[{"code":200,"description":"Document transformation details retrieved successfully","schema":{"id":"string","documentId":"string","chunks":"array","created_at":"string","updated_at":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/document/list","description":"List all documents for the authenticated user.","parameters":[],"responses":[{"code":200,"description":"Documents retrieved successfully","schema":{"type":"array","items":{"id":"string","title":"string","short":"string","filename":"string","filestore":"string","ext":"string","vectorized":"boolean","transformed":"boolean","created_at":"string","updated_at":"string"}}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/document/list/embeded","description":"List all documents that have been embedded/vectorized.","parameters":[],"responses":[{"code":200,"description":"Embedded documents retrieved successfully","schema":{"type":"array","items":{"id":"string","title":"string","short":"string","filename":"string","filestore":"string","ext":"string","vectorized":"boolean","transformed":"boolean","created_at":"string","updated_at":"string"}}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/document/upload","description":"Upload a new document file.","parameters":[{"name":"document","type":"file","description":"The document file to upload"},{"name":"short","type":"string","description":"Brief description of the document"},{"name":"title","type":"string","description":"Title for the document"}],"responses":[{"code":200,"description":"Document uploaded successfully","schema":{"status":"string","message":"string"}},{"code":400,"description":"Validation error","schema":{"error":"string","message":"string","code":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/document/update","description":"Update metadata for an existing document.","parameters":[{"name":"id","type":"string","description":"ID of the document to update"},{"name":"title","type":"string","description":"New title for the document"},{"name":"short","type":"string","description":"New description for the document"}],"responses":[{"code":200,"description":"Document updated successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/document/:id","description":"Get details of a specific document.","parameters":[],"responses":[{"code":200,"description":"Document details retrieved successfully","schema":{"id":"string","title":"string","short":"string","filename":"string","filestore":"string","ext":"string","vectorized":"boolean","transformed":"boolean","created_at":"string","updated_at":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"DELETE","path":"/document/delete","description":"Delete a document and all associated data.","parameters":[{"name":"id","type":"string","description":"ID of the document to delete"}],"responses":[{"code":200,"description":"Document deleted successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]}]},"history":{"path":"/api/v1/history","methods":["GET","POST","PUT","DELETE"],"description":"Chat history and conversation management","endpoints":[{"method":"GET","path":"/history/list","description":"List all chat history records for the authenticated user.","parameters":[],"responses":[{"code":200,"description":"Chat history records retrieved successfully","schema":{"type":"array","items":{"id":"string","title":"string","short":"string","temp":"boolean","created_at":"string","updated_at":"string"}}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/history/save","description":"Save or update a chat history record.","parameters":[{"name":"title","type":"string","description":"Title for the chat history"},{"name":"short","type":"string","description":"Brief description of the chat history"},{"name":"temp","type":"boolean","description":"Flag indicating if this is a temporary chat"},{"name":"historyId","type":"string","description":"ID of existing history record to update (optional)"}],"responses":[{"code":200,"description":"Chat history record saved successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/history/update","description":"Update metadata for an existing chat history record.","parameters":[{"name":"title","type":"string","description":"New title for the chat history"},{"name":"short","type":"string","description":"New description for the chat history"},{"name":"id","type":"string","description":"ID of the history record to update"},{"name":"temp","type":"boolean","description":"Flag indicating if this is a temporary chat"}],"responses":[{"code":200,"description":"Chat history record updated successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"DELETE","path":"/history/delete","description":"Delete a chat history record.","parameters":[{"name":"id","type":"string","description":"ID of the history record to delete"}],"responses":[{"code":200,"description":"Chat history record deleted successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/history/:historyId","description":"Get details of a specific chat history record.","parameters":[],"responses":[{"code":200,"description":"Chat history record retrieved successfully","schema":{"id":"string","title":"string","short":"string","temp":"boolean","messages":"array","created_at":"string","updated_at":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"DELETE","path":"/history/clean","description":"Cleans all temporary history chats by user","parameters":[],"responses":[{"code":200,"description":"Clean history success","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/history/replace/:historyId","description":"Replace the current chat session with a saved history record.","parameters":[],"responses":[{"code":200,"description":"Chat session replaced successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]}]},"settings":{"path":"/api/v1/settings","methods":["GET"],"description":"Application settings and model configuration","endpoints":[{"method":"GET","path":"/settings/defaults","description":"Get default application settings and configurations.","parameters":[],"responses":[{"code":200,"description":"Default settings retrieved successfully","schema":{"defaults":"object"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/settings/platforms","description":"Get available AI platforms.","parameters":[],"responses":[{"code":200,"description":"Platforms retrieved successfully","schema":{"platforms":"object"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/settings/recommendations","description":"Get recommended AI platform and model settings","parameters":[],"responses":[{"code":200,"description":"Recommendations retrieved successfully","schema":{"platforms":"object"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/settings/engine/:engine","description":"Get models for a specific AI platform.","parameters":[],"responses":[{"code":200,"description":"Models retrieved successfully","schema":{"engine":"string","settings":"object"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]}]},"tools":{"path":"/api/v1/tools","methods":["GET","POST","DELETE"],"description":"Custom function and tool management","endpoints":[{"method":"GET","path":"/tools/function/list","description":"List all custom functions/tools for the authenticated user.","parameters":[],"responses":[{"code":200,"description":"Custom functions retrieved successfully","schema":{"type":"array","items":{"id":"string","name":"string","short":"string","className":"string","classFunction":"string","created_at":"string","updated_at":"string"}}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/tools/function/:functionId","description":"Get details of a specific custom function/tool.","parameters":[],"responses":[{"code":200,"description":"Custom function details retrieved successfully","schema":{"id":"string","name":"string","short":"string","className":"string","functionCode":"string","functionPrompt":"string","classFunction":"string","created_at":"string","updated_at":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/tools/function","description":"Create or update a custom function/tool.","parameters":[{"name":"functionId","type":"string","description":"ID of the function (for updates)"},{"name":"functionName","type":"string","description":"Name of the function"},{"name":"functionShort","type":"string","description":"Brief description of the function"},{"name":"className","type":"string","description":"Name of the class containing the function"},{"name":"functionCode","type":"string","description":"The actual code for the function"},{"name":"functionPrompt","type":"string","description":"Prompt to guide the AI on when to use this function"},{"name":"classFunction","type":"string","description":"Name of the specific function within the class"}],"responses":[{"code":200,"description":"Custom function created/updated successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"DELETE","path":"/tools/function","description":"Delete a custom function/tool.","parameters":[{"name":"id","type":"string","description":"ID of the function to delete"}],"responses":[{"code":200,"description":"Custom function deleted successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/tools/function/test","description":"Test a custom function with a sample question.","parameters":[{"name":"question","type":"string","description":"Sample question to test the function with"},{"name":"role","type":"string","description":"Role for the test message"},{"name":"model","type":"string","description":"AI model to use for testing"},{"name":"engine","type":"string","description":"AI platform/engine to use for testing"},{"name":"functionId","type":"string","description":"ID of the function to test"}],"responses":[{"code":200,"description":"Function test completed successfully","schema":{"role":"string","content":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]}]},"websites":{"path":"/api/v1/website","methods":["GET","POST","DELETE"],"description":"Website scraping, content extraction, and embedding","endpoints":[{"method":"GET","path":"/website/list","description":"List all websites for the authenticated user.","parameters":[],"responses":[{"code":200,"description":"Websites retrieved successfully","schema":{"type":"array","items":{"id":"string","title":"string","short":"string","url":"string","vectorized":"boolean","scraped":"boolean","created_at":"string","updated_at":"string"}}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/website","description":"Add a new website entry.","parameters":[{"name":"id","type":"string","description":"ID of the website (for updates)"},{"name":"title","type":"string","description":"Title for the website"},{"name":"short","type":"string","description":"Brief description of the website"},{"name":"url","type":"string","description":"URL of the website to process"}],"responses":[{"code":200,"description":"Website entry created/updated successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/website/:id","description":"Get details of a specific website.","parameters":[],"responses":[{"code":200,"description":"Website details retrieved successfully","schema":{"id":"string","title":"string","short":"string","url":"string","vectorized":"boolean","scraped":"boolean","created_at":"string","updated_at":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"DELETE","path":"/website","description":"Delete a website and all associated data.","parameters":[{"name":"id","type":"string","description":"ID of the website to delete"}],"responses":[{"code":200,"description":"Website deleted successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/website/scrape","description":"Scrape and extract content from a website.","parameters":[{"name":"id","type":"string","description":"ID of the website to scrape"},{"name":"title","type":"string","description":"Title for the website"},{"name":"short","type":"string","description":"Brief description of the website"},{"name":"url","type":"string","description":"URL of the website to scrape"},{"name":"scrapeLevel","type":"integer","description":"Depth level for scraping (1-3)"},{"name":"scrapeType","type":"string","description":"Type of scraping method to use"},{"name":"splitType","type":"string","description":"How to split the scraped content"},{"name":"startTag","type":"string","description":"HTML tag to start scraping from"},{"name":"exclude","type":"string","description":"Elements to exclude from scraping"},{"name":"actions","type":"string","description":"Actions to perform during scraping"},{"name":"platform","type":"string","description":"AI platform to use for processing"},{"name":"model","type":"string","description":"AI model to use for processing"}],"responses":[{"code":200,"description":"Website scraped successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/website/scrape/:id","description":"Get scraping details for a specific website.","parameters":[],"responses":[{"code":200,"description":"Website scraping details retrieved successfully","schema":{"id":"string","websiteId":"string","content":"string","chunks":"array","created_at":"string","updated_at":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/website/embed","description":"Create vector embeddings for a website's content.","parameters":[{"name":"id","type":"string","description":"ID of the website to embed"},{"name":"model","type":"string","description":"AI model to use for creating embeddings"},{"name":"platform","type":"string","description":"AI platform to use for creating embeddings"},{"name":"contextSize","type":"integer","description":"Size of the context window for embedding"}],"responses":[{"code":200,"description":"Website embedded successfully","schema":{"status":"string","message":"string"}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"POST","path":"/website/embed/search","description":"Search website embeddings using a text query.","parameters":[{"name":"id","type":"string","description":"ID of the website to search within"},{"name":"queryText","type":"string","description":"Text query to search for in embeddings"},{"name":"limit","type":"integer","description":"Maximum number of results to return"},{"name":"postFilter","type":"string","description":"Flag to apply post-processing filtering to results"}],"responses":[{"code":200,"description":"Website search completed successfully","schema":{"type":"array","items":{"id":"string","content":"string","similarity":"number"}}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]},{"method":"GET","path":"/website/list/embeded","description":"List all websites that have been embedded/vectorized.","parameters":[],"responses":[{"code":200,"description":"Embedded websites retrieved successfully","schema":{"type":"array","items":{"id":"string","title":"string","short":"string","url":"string","vectorized":"boolean","scraped":"boolean","created_at":"string","updated_at":"string"}}},{"code":401,"description":"Authentication failed","schema":{"error":"string","message":"string","code":"string"}},{"code":500,"description":"Internal server error","schema":{"error":"string","message":"string","code":"string"}}]}]}}}