{"openapi":"3.1.0","info":{"title":"EpsimoAI API","description":"\n    ## EpsimoAI - Advanced AI Assistant Platform\n\n    EpsimoAI provides a comprehensive API for managing AI assistants, conversations, and intelligent workflows.\n\n    ### Key Features:\n    - **AI Assistants**: Create and manage custom AI assistants with different configurations\n    - **Conversation Threads**: Organize conversations in threads for better context management\n    - **Real-time Streaming**: Stream AI responses in real-time for better user experience\n    - **File Ingestion**: Upload and process documents for knowledge-based conversations\n    - **Project Management**: Organize work in projects with team collaboration\n    - **Authentication**: Secure access with JWT tokens and OAuth integration\n    - **Payment Integration**: Stripe-powered billing for usage-based pricing\n    - **Tool Integration**: Connect external tools and services to enhance AI capabilities\n\n    ### Getting Started:\n    1. **Authenticate**: Use `/auth/login` or `/auth/google/login` to get your JWT token\n    2. **Create Project**: Set up a project workspace with `/projects/`\n    3. **Create Assistant**: Configure your AI assistant with `/assistants/`\n    4. **Start Conversation**: Create a thread and begin chatting with `/threads/` and `/runs/`\n\n    ### Authentication:\n    Most endpoints require authentication. Include your JWT token in the Authorization header:\n    ```\n    Authorization: Bearer <your-jwt-token>\n    ```\n    ","termsOfService":"https://epsimoai.com/terms","contact":{"name":"EpsimoAI Support","url":"https://epsimoai.com/support","email":"support@epsimoai.com"},"license":{"name":"MIT License","url":"https://opensource.org/licenses/MIT"},"version":"1.0.0"},"servers":[{"url":"https://api.epsimoagents.com","description":"Production server"},{"url":"https://staging-api.epsimoai.com","description":"Staging server"},{"url":"http://localhost:8100","description":"Development server"}],"paths":{"/ok":{"get":{"summary":"Ok","operationId":"ok_ok_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Authenticate user with email and password","description":"Authenticate a user using email and password credentials.\n\n    **Process:**\n    1. Validates email and password against the database\n    2. Ensures user has a 'main' project (creates if needed)\n    3. Generates a JWT token valid for 30 days\n    4. Returns the JWT token for API authentication\n\n    **Usage:**\n    Include the returned JWT token in the Authorization header for subsequent requests:\n    ```\n    Authorization: Bearer <jwt_token>\n    ```","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Login successful, JWT token returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"401":{"description":"Invalid email or password"},"400":{"description":"Invalid request format"},"422":{"description":"Validation error in request data"}}}},"/auth/signup":{"post":{"tags":["auth"],"summary":"Create a new user account","description":"Register a new user account with email and password.\n\n    **Process:**\n    1. Creates a new user with the provided credentials\n    2. Automatically creates a 'main' project for the user\n    3. Returns user information upon successful creation\n\n    **Form data required:**\n    - `email`: Valid email address (will be used for login)\n    - `password`: Secure password for the account\n\n    **Note:** Email addresses must be unique in the system.","operationId":"signup_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"User account created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupResponse"}}}},"400":{"description":"User already exists or invalid data"},"422":{"description":"Validation error in form data"}}}},"/auth/google/login":{"get":{"tags":["auth"],"summary":"Initiate Google OAuth login","description":"Start the Google OAuth authentication flow.\n\n    **Process:**\n    1. Redirects user to Google's OAuth consent screen\n    2. User authorizes the application\n    3. Google redirects back to `/auth/google/callback`\n    4. Callback endpoint processes the authentication and returns JWT token\n\n    **Usage:**\n    - Redirect users to this endpoint to start Google login\n    - Handle the callback URL in your frontend application","operationId":"google_login_auth_google_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"Redirect to Google OAuth consent screen"},"500":{"description":"OAuth configuration error"}}}},"/auth/google/callback":{"get":{"tags":["auth"],"summary":"Handle Google OAuth callback","description":"Process the Google OAuth callback and complete authentication.\n\n    **Process:**\n    1. Receives authorization code from Google\n    2. Exchanges code for user information\n    3. Creates or retrieves user account\n    4. Generates JWT token\n    5. Redirects to frontend with token\n\n    **Note:** This endpoint is called automatically by Google OAuth flow.\n    Users should not call this endpoint directly.","operationId":"google_callback_auth_google_callback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"Redirect to frontend with JWT token"},"400":{"description":"Invalid OAuth callback data"},"500":{"description":"Authentication processing error"}}}},"/auth/exchange":{"post":{"tags":["auth"],"summary":"Exchange Cognito JWT for EpsimoAI JWT","description":"Exchange an AWS Cognito ID token for an EpsimoAI JWT token.\n    \n    **Process:**\n    1. Verifies the Cognito ID token using Cognito JWKS\n    2. Extracts email and sub (user ID) from Cognito token\n    3. Creates EpsimoAI user if missing\n    4. Ensures user has a 'main' project (creates if needed)\n    5. Generates a 1-hour EpsimoAI JWT signed with RS256\n    \n    **Usage:**\n    LeadGenius frontend should call this endpoint after Cognito authentication\n    to obtain an EpsimoAI JWT for API access.\n    \n    **Request:**\n    - Authorization header: `Bearer <cognito-id-token>`\n    \n    **Response:**\n    - Returns EpsimoAI JWT token valid for 1 hour","operationId":"exchange_auth_exchange_post","responses":{"200":{"description":"JWT exchange successful, EpsimoAI token returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}},"401":{"description":"Invalid or expired Cognito token"},"500":{"description":"Configuration error or processing failure"}}}},"/auth/thread-info":{"get":{"tags":["auth"],"summary":"Get user thread usage information","description":"Retrieve the current user's thread usage statistics.\n\n    **Returns:**\n    - `thread_counter`: Number of threads currently used by the user\n    - `thread_max`: Maximum number of threads allowed for the user\n\n    **Usage:**\n    This endpoint is useful for displaying usage limits in the UI and\n    preventing users from exceeding their thread quotas.","operationId":"thread_info_auth_thread_info_get","responses":{"200":{"description":"Thread usage information retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadInfoResponse"}}}},"401":{"description":"Authentication required"},"404":{"description":"User thread information not found"}}}},"/auth/verify-email":{"post":{"tags":["auth"],"summary":"Verify email address with code","description":"Verify a user's email address using the verification code sent via email.\n\n    **Process:**\n    1. Validates the verification code\n    2. Marks the user's email as verified\n    3. Enables the user to log in\n\n    **Note:** Verification codes expire after 15 minutes and have a maximum of 3 attempts.","operationId":"verify_email_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"description":"Email verified successfully","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Verify Email Auth Verify Email Post"}}}},"400":{"description":"Invalid or expired verification code"},"422":{"description":"Validation error in request data"}}}},"/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend email verification code","description":"Resend the email verification code to the user's email address.\n\n    **Rate Limiting:**\n    - Only one code can be sent per minute per email address\n    - Only available for unverified accounts\n\n    **Use Cases:**\n    - User didn't receive the original verification email\n    - Verification code expired","operationId":"resend_verification_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Verification code resent successfully","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Resend Verification Auth Resend Verification Post"}}}},"400":{"description":"Rate limited or email already verified"},"404":{"description":"User not found"},"422":{"description":"Validation error in request data"}}}},"/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Request password reset","description":"Request a password reset link to be sent to the user's email address.\n\n    **Process:**\n    1. Validates that the email exists in the system\n    2. Generates a secure reset token\n    3. Sends password reset email with link\n\n    **Security:**\n    - Reset tokens expire after 1 hour\n    - Only one active token per user at a time\n    - Tokens are single-use only","operationId":"forgot_password_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Password reset email sent","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Forgot Password Auth Forgot Password Post"}}}},"404":{"description":"Email address not found"},"422":{"description":"Validation error in request data"}}}},"/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset password with token","description":"Reset user password using a valid reset token from email.\n\n    **Process:**\n    1. Validates the reset token\n    2. Updates the user's password\n    3. Invalidates the reset token\n\n    **Security:**\n    - Tokens expire after 1 hour\n    - Tokens are single-use only\n    - Password is securely hashed before storage","operationId":"reset_password_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Password reset successfully","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Reset Password Auth Reset Password Post"}}}},"400":{"description":"Invalid or expired reset token"},"422":{"description":"Validation error in request data"}}}},"/auth/delete-user":{"delete":{"tags":["auth"],"summary":"Delete user account","description":"Permanently delete a user account and all associated data.\n\n    **This action will delete:**\n    - User account and profile\n    - All projects owned by the user\n    - All AI assistants created by the user\n    - All conversation threads and chat history\n    - All uploaded files and documents\n    - All verification codes and reset tokens\n\n    **Security:**\n    - Requires valid JWT authentication\n    - Email confirmation required for safety\n    - Action is irreversible and permanent\n\n    **Warning:** This operation cannot be undone!","operationId":"delete_user_auth_delete_user_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserRequest"}}},"required":true},"responses":{"200":{"description":"User account deleted successfully","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Delete User Auth Delete User Delete"}}}},"400":{"description":"Email confirmation mismatch or invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Access denied"},"422":{"description":"Validation error in request data"},"500":{"description":"Internal server error during deletion"}}}},"/auth/verification-status/{email}":{"get":{"tags":["auth"],"summary":"Check email verification status","description":"Check if an email address has been verified.\n\n    **Use Cases:**\n    - Frontend UI to show verification status\n    - Conditional logic based on verification state\n\n    **Note:** This endpoint is public to allow checking before login.","operationId":"get_verification_status_auth_verification_status__email__get","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","description":"Email address to check","format":"email","title":"Email"},"description":"Email address to check"}],"responses":{"200":{"description":"Verification status retrieved","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Verification Status Auth Verification Status  Email  Get"}}}},"422":{"description":"Invalid email format"}}}},"/auth/user-info":{"get":{"tags":["auth"],"summary":"User Info","description":"Get current user information.","operationId":"user_info_auth_user_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response User Info Auth User Info Get"}}}}}}},"/projects/":{"get":{"tags":["projects"],"summary":"List user's projects","description":"Retrieve all projects owned by the authenticated user.\n\n    **Projects organize:**\n    - AI assistants and their configurations\n    - Conversation threads and history\n    - User permissions and access control\n    - Resource usage and billing\n\n    **Returns:**\n    List of project objects containing project metadata and access information.","operationId":"list_projects_projects__get","responses":{"200":{"description":"List of projects retrieved successfully","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Project"},"type":"array","title":"Response List Projects Projects  Get"}}}},"401":{"description":"Authentication required"}}},"post":{"tags":["projects"],"summary":"Create a new project","description":"Create a new project workspace for organizing assistants and threads.\n\n    **Projects provide:**\n    - Isolated workspace for assistants and threads\n    - Separate billing and usage tracking\n    - Team collaboration capabilities\n    - Resource organization and management\n\n    **Usage:**\n    Projects help organize your AI assistants and conversations into logical groups.\n    Each project maintains its own set of assistants, threads, and configurations.","operationId":"create_project_projects__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreateRequest"}}},"required":true},"responses":{"200":{"description":"Project created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"description":"Invalid project data"},"401":{"description":"Authentication required"},"422":{"description":"Validation error in request data"}}}},"/projects/{project_id}":{"get":{"tags":["projects"],"summary":"Switch to project and get JWT token","description":"Switch the user's active project context and receive a new JWT token.\n\n    **Process:**\n    1. Validates user has access to the specified project\n    2. Generates a new JWT token with the project context\n    3. Returns the token for subsequent API calls\n\n    **Use cases:**\n    - Switch between different project workspaces\n    - Update authentication context\n    - Access project-specific resources\n\n    **Note:** The returned JWT token should replace the current token for API authentication.","operationId":"get_project_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Project switched successfully, new JWT token returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSwitchResponse"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access denied to this project"},"404":{"description":"Project not found"},"422":{"description":"Validation error in project ID"}}},"delete":{"tags":["projects"],"summary":"Delete Project","description":"Delete a project by ID, with confirmation if threads or assistants exist.\n\n    **Process:**\n    1. Checks if project contains threads or assistants\n    2. If resources exist and confirm=false, returns confirmation request\n    3. If confirm=true or no resources, deletes project and all associated data\n\n    **Warning:** This action is irreversible and will delete:\n    - All conversation threads in the project\n    - All AI assistants in the project\n    - All project metadata and configurations\n\n    **Use confirm=true query parameter to force deletion.**","operationId":"delete_project_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"confirm","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Confirm"}}],"responses":{"200":{"description":"Project deletion status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDeleteResponse"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access denied to this project"},"404":{"description":"Project not found"},"422":{"description":"Validation error in project ID"}}},"put":{"tags":["projects"],"summary":"Update Project","description":"Update an existing project's name and description.\n\n    **Process:**\n    1. Validates user has access to the project\n    2. Updates the project with new information\n    3. Returns the updated project object\n\n    **Use cases:**\n    - Rename projects for better organization\n    - Update project descriptions as scope changes\n    - Maintain accurate project metadata","operationId":"update_project_projects__project_id__put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdateRequest"}}}},"responses":{"200":{"description":"Project updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access denied to this project"},"404":{"description":"Project not found"},"422":{"description":"Validation error in request data"}}}},"/assistants/":{"get":{"tags":["assistants"],"summary":"List user's AI assistants","description":"Retrieve all AI assistants created by the authenticated user within their current project.\n\n    **Returns:**\n    A list of assistant objects containing:\n    - `assistant_id`: Unique identifier for the assistant\n    - `name`: Human-readable name of the assistant\n    - `config`: Configuration settings and behavior parameters\n    - `public`: Whether the assistant is publicly accessible\n    - `updated_at`: Last modification timestamp\n\n    **Use cases:**\n    - Display available assistants in the UI\n    - Select an assistant for creating new threads\n    - Manage and organize AI assistants","operationId":"list_assistants_assistants__get","responses":{"200":{"description":"List of assistants retrieved successfully","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Assistant"},"type":"array","title":"Response List Assistants Assistants  Get"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access denied to project"}}},"post":{"tags":["assistants"],"summary":"Create Assistant","description":"Create an assistant.","operationId":"create_assistant_assistants__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/public/":{"get":{"tags":["assistants"],"summary":"List public AI assistants","description":"Retrieve all publicly available AI assistants that can be used by any user.\n\n    **Public assistants:**\n    - Created by users and marked as public\n    - Can be used by anyone without authentication\n    - Useful for discovering pre-built assistant templates\n    - Cannot be modified by non-owners\n\n    **Use cases:**\n    - Browse available public assistants\n    - Find assistants for specific use cases\n    - Discover community-created templates","operationId":"list_public_assistants_assistants_public__get","responses":{"200":{"description":"List of public assistants retrieved successfully","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Assistant"},"type":"array","title":"Response List Public Assistants Assistants Public  Get"}}}},"500":{"description":"Error retrieving public assistants"}}}},"/assistants/{aid}":{"get":{"tags":["assistants"],"summary":"Get specific AI assistant","description":"Retrieve detailed information about a specific AI assistant by its ID.\n\n    **Returns:**\n    Complete assistant object including:\n    - Configuration settings and parameters\n    - Behavior and personality settings\n    - Tool and integration configurations\n    - Access permissions and metadata\n\n    **Access control:**\n    - Users can only access assistants in their project\n    - Public assistants are accessible to everyone","operationId":"get_assistant_assistants__aid__get","parameters":[{"name":"aid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the assistant.","title":"Aid"},"description":"The ID of the assistant."}],"responses":{"200":{"description":"Assistant details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access denied to this assistant"},"404":{"description":"Assistant not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["assistants"],"summary":"Upsert Assistant","description":"Create or update an assistant.","operationId":"upsert_assistant_assistants__aid__put","parameters":[{"name":"aid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the assistant.","title":"Aid"},"description":"The ID of the assistant."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["assistants"],"summary":"Delete Assistant","description":"Delete an assistant by ID.","operationId":"delete_assistant_assistants__aid__delete","parameters":[{"name":"aid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the assistant.","title":"Aid"},"description":"The ID of the assistant."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/{aid}/project":{"put":{"tags":["assistants"],"summary":"Update Assistant Project","description":"Update an assistant's project.","operationId":"update_assistant_project_assistants__aid__project_put","parameters":[{"name":"aid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the assistant.","title":"Aid"},"description":"The ID of the assistant."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantProjectUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/{aid}/files":{"get":{"tags":["assistants"],"summary":"List embedded files for assistant","description":"Retrieve all files that have been embedded into an AI assistant's knowledge base.\n\n    **Returns:**\n    A list of embedded files containing:\n    - `id`: Unique identifier for the embedded file\n    - `name`: Original filename\n    - `size`: File size in bytes (if available)\n    - `metadata`: Additional file metadata\n\n    **Use cases:**\n    - Display embedded files in the assistant configuration UI\n    - Manage and organize assistant knowledge base\n    - Remove outdated or incorrect files","operationId":"list_assistant_files_assistants__aid__files_get","parameters":[{"name":"aid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the assistant.","title":"Aid"},"description":"The ID of the assistant."}],"responses":{"200":{"description":"List of embedded files retrieved successfully","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Assistant Files Assistants  Aid  Files Get"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access denied to this assistant"},"404":{"description":"Assistant not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["assistants"],"summary":"Upload and embed files for assistant","description":"Upload one or more files to be processed and embedded into an AI assistant's knowledge base.\n\n    **Supported file types:**\n    - All file types are supported\n    - PDF documents (.pdf) - fully parsed\n    - Microsoft Word documents (.docx, .doc) - fully parsed\n    - Text files (.txt, .md, .html, .csv) - fully parsed\n    - Other file types - attempted text extraction with fallback parser\n\n    **Process:**\n    1. Files are uploaded and converted to text\n    2. Content is chunked and vectorized\n    3. Embeddings are stored in the vector database\n    4. Assistant can then reference this content in conversations\n\n    **Requirements:**\n    - Valid JWT token for authentication\n    - Assistant must exist and user must have access\n    - No file size limits","operationId":"upload_assistant_files_assistants__aid__files_post","parameters":[{"name":"aid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the assistant.","title":"Aid"},"description":"The ID of the assistant."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_assistant_files_assistants__aid__files_post"}}}},"responses":{"200":{"description":"Files successfully uploaded and embedded","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Assistant Files Assistants  Aid  Files Post"}}}},"400":{"description":"Invalid configuration"},"401":{"description":"Authentication required"},"404":{"description":"Assistant not found"},"503":{"description":"Vector store not available"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/{aid}/files/{file_id}":{"delete":{"tags":["assistants"],"summary":"Delete embedded file from assistant","description":"Remove a specific file from an AI assistant's knowledge base.\n\n    **This action:**\n    - Permanently removes the file and all its chunks from the vector database\n    - Cannot be undone - the file will need to be re-uploaded to restore it\n    - Does not affect the assistant's configuration, only its knowledge base\n\n    **Use cases:**\n    - Remove outdated or incorrect information\n    - Clean up assistant knowledge base\n    - Manage storage usage","operationId":"delete_assistant_file_assistants__aid__files__file_id__delete","parameters":[{"name":"aid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the assistant.","title":"Aid"},"description":"The ID of the assistant."},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the file to delete","title":"File Id"},"description":"The ID of the file to delete"}],"responses":{"200":{"description":"File deleted successfully","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Assistant File Assistants  Aid  Files  File Id  Delete"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access denied to this assistant"},"404":{"description":"Assistant or file not found"},"500":{"description":"Error deleting file"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/{aid}/openai-account":{"put":{"tags":["assistants"],"summary":"Set OpenAI account for public assistant","description":"Configure OpenAI account settings for a public assistant.\n    Each public assistant can have its own OpenAI API key and base URL.\n\n    **Security:**\n    - API key is stored in the assistant's config\n    - API key is never returned in full in responses\n    - Only returns a masked version (shows first few characters)","operationId":"set_assistant_openai_account_assistants__aid__openai_account_put","parameters":[{"name":"aid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the assistant.","title":"Aid"},"description":"The ID of the assistant."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantOpenAIAccountPayload"}}}},"responses":{"200":{"description":"OpenAI account configured successfully","content":{"application/json":{"schema":{}}}},"401":{"description":"Authentication required"},"403":{"description":"Access denied to this assistant"},"404":{"description":"Assistant not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["assistants"],"summary":"Get OpenAI account for assistant","description":"Get OpenAI account configuration for a public assistant.\n    API key is masked for security.","operationId":"get_assistant_openai_account_assistants__aid__openai_account_get","parameters":[{"name":"aid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the assistant.","title":"Aid"},"description":"The ID of the assistant."}],"responses":{"200":{"description":"OpenAI account retrieved successfully","content":{"application/json":{"schema":{}}}},"401":{"description":"Authentication required"},"403":{"description":"Access denied to this assistant"},"404":{"description":"Assistant not found or no OpenAI account configured"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["assistants"],"summary":"Delete OpenAI account for assistant","description":"Remove OpenAI account configuration from a public assistant.","operationId":"delete_assistant_openai_account_assistants__aid__openai_account_delete","parameters":[{"name":"aid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the assistant.","title":"Aid"},"description":"The ID of the assistant."}],"responses":{"200":{"description":"OpenAI account removed successfully","content":{"application/json":{"schema":{}}}},"401":{"description":"Authentication required"},"403":{"description":"Access denied to this assistant"},"404":{"description":"Assistant not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs/":{"post":{"tags":["runs"],"summary":"Create Run","description":"Create a run.","operationId":"create_run_runs__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs/stream":{"post":{"tags":["runs"],"summary":"Stream Run with Tool Calling Support","description":"Stream assistant responses using Server-Sent Events (SSE) with full tool calling support.\n    \n    ## Response Format\n    \n    The endpoint returns Server-Sent Events (SSE) with the following event types:\n    \n    ### 1. Start Event\n    ```\n    event: start\n    data: {\"status\":\"starting\"}\n    ```\n    \n    ### 2. Metadata Event (Run ID)\n    ```\n    event: metadata\n    data: {\"run_id\":\"run_abc123...\"}\n    ```\n    \n    ### 3. Data Events (Messages)\n    \n    **AIMessage with Tool Calls:**\n    ```\n    event: data\n    data: [{\n      \"type\": \"AIMessage\",\n      \"data\": {\n        \"id\": \"msg_abc123\",\n        \"content\": \"\",\n        \"tool_calls\": [{\n          \"id\": \"call_xyz789\",\n          \"name\": \"search_tavily\",\n          \"args\": {\n            \"query\": \"artificial intelligence news 2026\",\n            \"search_depth\": \"advanced\"\n          },\n          \"type\": \"tool_call\"\n        }]\n      }\n    }]\n    ```\n    \n    **ToolMessage (Tool Response):**\n    ```\n    event: data\n    data: [{\n      \"type\": \"ToolMessage\",\n      \"data\": {\n        \"id\": \"msg_tool_123\",\n        \"content\": \"[Search results...]\",\n        \"tool_call_id\": \"call_xyz789\",\n        \"name\": \"search_tavily\"\n      }\n    }]\n    ```\n    \n    **Regular AIMessage:**\n    ```\n    event: data\n    data: [{\n      \"type\": \"AIMessage\",\n      \"data\": {\n        \"id\": \"msg_ai_2\",\n        \"content\": \"Based on the search results...\"\n      }\n    }]\n    ```\n    \n    ### 4. End Event\n    ```\n    event: end\n    ```\n    \n    ### 5. Error Event (if error occurs)\n    ```\n    event: error\n    data: {\n      \"status_code\": 500,\n      \"message\": \"Error message\",\n      \"type\": \"error_type\",\n      \"details\": \"Additional details\"\n    }\n    ```\n    \n    ## Tool Calling\n    \n    When an assistant has tools configured, the LLM can make tool calls:\n    \n    1. **Tool Call**: Sent as `AIMessage` with `tool_calls` array\n    2. **Tool Execution**: Backend executes the tool\n    3. **Tool Response**: Sent as `ToolMessage` with `tool_call_id` matching the call\n    4. **Final Response**: LLM processes tool results and sends final `AIMessage`\n    \n    Tool calls are streamed incrementally - you'll see multiple messages with the same `tool_call.id` as arguments are built up.\n    \n    ## Example Request\n    \n    ```json\n    {\n      \"thread_id\": \"thread_123\",\n      \"input\": [\n        {\n          \"type\": \"human\",\n          \"content\": \"Search for recent AI news\"\n        }\n      ],\n      \"config\": {\n        \"configurable\": {\n          \"assistant_id\": \"assistant_123\",\n          \"thread_id\": \"thread_123\",\n          \"user_id\": \"user_123\"\n        }\n      }\n    }\n    ```\n    \n    ## Frontend Consumption\n    \n    Use EventSource API to consume the stream:\n    \n    ```javascript\n    const eventSource = new EventSource('/runs/stream', {\n      method: 'POST',\n      body: JSON.stringify(payload)\n    });\n    \n    eventSource.addEventListener('data', (event) => {\n      const messages = JSON.parse(event.data);\n      messages.forEach(msg => {\n        if (msg.type === 'AIMessage' && msg.data.tool_calls) {\n          // Handle tool calls\n        }\n        if (msg.type === 'ToolMessage') {\n          // Handle tool responses\n        }\n      });\n    });\n    ```","operationId":"stream_run_runs_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunPayload"}}},"required":true},"responses":{"200":{"description":"SSE stream of messages","content":{"application/json":{"schema":{}},"text/event-stream":{"schema":{"type":"string","example":"event: start\ndata: {\"status\":\"starting\"}\n\nevent: metadata\ndata: {\"run_id\":\"run_abc123\"}\n\nevent: data\ndata: [{\"type\":\"AIMessage\",\"data\":{\"id\":\"msg_1\",\"content\":\"\",\"tool_calls\":[{\"id\":\"call_1\",\"name\":\"search_tavily\",\"args\":{\"query\":\"AI news\"},\"type\":\"tool_call\"}]}}]\n\nevent: data\ndata: [{\"type\":\"ToolMessage\",\"data\":{\"id\":\"msg_2\",\"content\":\"[results]\",\"tool_call_id\":\"call_1\",\"name\":\"search_tavily\"}}]\n\nevent: end"}}}},"422":{"description":"Validation Error - Invalid request payload"},"404":{"description":"Thread or Assistant not found"},"503":{"description":"Agent not initialized - API keys not configured"}}}},"/runs/input_schema":{"get":{"tags":["runs"],"summary":"Input Schema","description":"Return the input schema of the runnable.","operationId":"input_schema_runs_input_schema_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Input Schema Runs Input Schema Get"}}}}}}},"/runs/output_schema":{"get":{"tags":["runs"],"summary":"Output Schema","description":"Return the output schema of the runnable.","operationId":"output_schema_runs_output_schema_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Output Schema Runs Output Schema Get"}}}}}}},"/runs/debug/assistant/{assistant_id}":{"get":{"tags":["runs"],"summary":"Debug Assistant Config","description":"Debug endpoint to inspect assistant config and tools.","operationId":"debug_assistant_config_runs_debug_assistant__assistant_id__get","parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","title":"Assistant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Debug Assistant Config Runs Debug Assistant  Assistant Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs/config_schema":{"get":{"tags":["runs"],"summary":"Config Schema","description":"Return the config schema of the runnable.","operationId":"config_schema_runs_config_schema_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Config Schema Runs Config Schema Get"}}}}}}},"/runs/feedback":{"post":{"tags":["runs"],"summary":"Create Run Feedback","description":"Send feedback on an individual run to langsmith\n\nNote that a successful response means that feedback was successfully\nsubmitted. It does not guarantee that the feedback is recorded by\nlangsmith. Requests may be silently rejected if they are\nunauthenticated or invalid by the server.","operationId":"create_run_feedback_runs_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Run Feedback Runs Feedback Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/runs/stream":{"post":{"tags":["public"],"summary":"Public Stream Run","description":"Public streaming run endpoint (no JWT required).\n\nThis is designed for external platforms (like Typebot) that need a simple\nURL to stream assistant responses without handling JWT authentication.\n\nAccess control is configured per-assistant via its config:\n\n- type==agent/access_mode:\n    - \"authenticated\" (default): not allowed on this endpoint\n    - \"public_token\": requires matching token\n    - \"public_no_auth\": fully public\n- type==agent/public_token: secret token value when using public_token mode","operationId":"public_stream_run_public_runs_stream_post","parameters":[{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional header for public token access.","title":"X-Public-Bot-Token"},"description":"Optional header for public token access."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateRunPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/openai/v1/chat/completions":{"options":{"tags":["public"],"summary":"Openai Compatible Chat Completions Options","description":"Handle CORS preflight requests for OpenAI-compatible endpoint.","operationId":"openai_compatible_chat_completions_options_public_openai_v1_chat_completions_options","parameters":[{"name":"Origin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["public"],"summary":"Openai Compatible Chat Completions","description":"OpenAI-compatible chat completions endpoint for public assistants.\n\nThis endpoint matches OpenAI's exact API structure: `/v1/chat/completions`\nThe assistant is identified by the token provided in the Authorization header.\n\n**Usage in Typebot:**\n- Base URL: `https://your-backend.com/public/openai/v1`\n- API Key: Your public assistant token (from `type==agent/public_token`)\n\nTypebot will automatically call `/chat/completions` on the base URL.\n\n**Example:**\n- Base URL: `https://api.epsimoai.com/public/openai/v1`\n- API Key: `your-public-token-here`\n- Full endpoint: `https://api.epsimoai.com/public/openai/v1/chat/completions`\n\nThe token identifies which assistant to use.","operationId":"openai_compatible_chat_completions_public_openai_v1_chat_completions_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Public-Bot-Token"}},{"name":"User-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User-Agent"}},{"name":"Origin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}},{"name":"Referer","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAICompatibleChatCompletionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/openai/v1/threads/{thread_id}/messages":{"post":{"tags":["public"],"summary":"Openai Thread Create Message","description":"Create a message in a thread (OpenAI Assistants API compatible).\n\nReturns a message object similar to OpenAI's format.\nStores the message for use in subsequent runs.","operationId":"openai_thread_create_message_public_openai_v1_threads__thread_id__messages_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","description":"Thread ID","title":"Thread Id"},"description":"Thread ID"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Public-Bot-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIThreadMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/openai/v1/threads/{thread_id}/runs":{"post":{"tags":["public"],"summary":"Openai Thread Create Run","description":"Create and run a thread (OpenAI Assistants API compatible).\n\nIf stream=True, returns SSE stream of run events.\nOtherwise returns a run object.","operationId":"openai_thread_create_run_public_openai_v1_threads__thread_id__runs_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","description":"Thread ID","title":"Thread Id"},"description":"Thread ID"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Public-Bot-Token"}},{"name":"Origin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIRunCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/openai/v1/assistants":{"options":{"tags":["public"],"summary":"Openai Assistants Options","description":"Handle CORS preflight requests for assistants endpoint.","operationId":"openai_assistants_options_public_openai_v1_assistants_options","parameters":[{"name":"Origin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["public"],"summary":"Openai List Assistants","description":"OpenAI-compatible list assistants endpoint.\n\nReturns the assistant associated with the provided token in OpenAI's format.\nTypebot uses this endpoint to populate the assistant dropdown.","operationId":"openai_list_assistants_public_openai_v1_assistants_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Public-Bot-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/openai/v1/assistants/{assistant_id}":{"get":{"tags":["public"],"summary":"Openai Get Assistant","description":"OpenAI-compatible get assistant endpoint.\n\nReturns a specific assistant in OpenAI's format.","operationId":"openai_get_assistant_public_openai_v1_assistants__assistant_id__get","parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","description":"The assistant ID","title":"Assistant Id"},"description":"The assistant ID"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Public-Bot-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/openai/v1/assistants/{assistant_id}/config":{"get":{"tags":["public"],"summary":"Get Openai Assistant Config","description":"Get OpenAI-compatible configuration for a public assistant.\n\nReturns the base URL and token needed to configure this assistant\nas an OpenAI assistant in Typebot or other platforms.","operationId":"get_openai_assistant_config_public_openai_v1_assistants__assistant_id__config_get","parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","description":"The assistant ID","title":"Assistant Id"},"description":"The assistant ID"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Public-Bot-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/v1/chat/completions":{"options":{"tags":["public"],"summary":"V1 Chat Completions Options","description":"Handle CORS preflight requests for /v1/chat/completions endpoint.","operationId":"v1_chat_completions_options_public_v1_chat_completions_options","parameters":[{"name":"Origin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["public"],"summary":"V1 Chat Completions","description":"Direct /v1/chat/completions endpoint for Typebot compatibility.\n\nThis endpoint proxies to /public/openai/v1/chat/completions to match\nOpenAI's standard API path structure that Typebot expects.\n\n**Usage in Typebot:**\n- Base URL: `https://api.epsimoagents.com`\n- API Key: Your public assistant token (from `type==agent/public_token`)\n\nTypebot will automatically call `/v1/chat/completions` on the base URL.","operationId":"v1_chat_completions_public_v1_chat_completions_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Public-Bot-Token"}},{"name":"User-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User-Agent"}},{"name":"Origin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}},{"name":"Referer","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAICompatibleChatCompletionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/v1/assistants":{"options":{"tags":["public"],"summary":"V1 Assistants Options","description":"Handle CORS preflight requests for /v1/assistants endpoint.","operationId":"v1_assistants_options_public_v1_assistants_options","parameters":[{"name":"Origin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["public"],"summary":"V1 List Assistants","description":"Direct /v1/assistants endpoint for Typebot compatibility.\n\nThis endpoint proxies to /public/openai/v1/assistants to match\nOpenAI's standard API path structure that Typebot expects.\n\nReturns the assistant associated with the provided token in OpenAI's format.\nTypebot uses this endpoint to populate the assistant dropdown.","operationId":"v1_list_assistants_public_v1_assistants_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Public-Bot-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/v1/assistants/{assistant_id}":{"get":{"tags":["public"],"summary":"V1 Get Assistant","description":"Direct /v1/assistants/{assistant_id} endpoint for Typebot compatibility.\n\nThis endpoint proxies to /public/openai/v1/assistants/{assistant_id} to match\nOpenAI's standard API path structure that Typebot expects.\n\nReturns a specific assistant in OpenAI's format.","operationId":"v1_get_assistant_public_v1_assistants__assistant_id__get","parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","description":"The assistant ID","title":"Assistant Id"},"description":"The assistant ID"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Public-Bot-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/":{"get":{"tags":["threads"],"summary":"List Threads","description":"List threads for the current user with pagination, ordered by most recently updated.","operationId":"list_threads_threads__get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["threads"],"summary":"Create Thread","description":"Create a thread.","operationId":"create_thread_threads__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadPutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/{tid}/state":{"get":{"tags":["threads"],"summary":"Get Thread State","description":"Get state for a thread.","operationId":"get_thread_state_threads__tid__state_get","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the thread.","title":"Tid"},"description":"The ID of the thread."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["threads"],"summary":"Add Thread State","description":"Add state to a thread.","operationId":"add_thread_state_threads__tid__state_post","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the thread.","title":"Tid"},"description":"The ID of the thread."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadPostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/{tid}/history":{"get":{"tags":["threads"],"summary":"Get Thread History","description":"Get all past states for a thread.","operationId":"get_thread_history_threads__tid__history_get","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the thread.","title":"Tid"},"description":"The ID of the thread."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/{tid}":{"get":{"tags":["threads"],"summary":"Get Thread","description":"Get a thread by ID.","operationId":"get_thread_threads__tid__get","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the thread.","title":"Tid"},"description":"The ID of the thread."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["threads"],"summary":"Upsert Thread","description":"Update a thread.","operationId":"upsert_thread_threads__tid__put","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the thread.","title":"Tid"},"description":"The ID of the thread."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadPutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["threads"],"summary":"Delete Thread","description":"Delete a thread by ID.","operationId":"delete_thread_threads__tid__delete","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the thread.","title":"Tid"},"description":"The ID of the thread."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/increment-counter":{"post":{"tags":["threads"],"summary":"Increment Thread Counter","description":"Increment the user's thread counter for external service usage.","operationId":"increment_thread_counter_threads_increment_counter_post","parameters":[{"name":"count","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Increment Thread Counter Threads Increment Counter Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/{tid}/files":{"get":{"tags":["threads"],"summary":"List embedded files for thread","description":"Retrieve all files that have been embedded into a thread's knowledge base.\n\n    **Returns:**\n    A list of embedded files containing:\n    - `id`: Unique identifier for the embedded file\n    - `name`: Original filename\n    - `size`: File size in bytes (if available)\n    - `metadata`: Additional file metadata\n\n    **Use cases:**\n    - Display embedded files in the thread UI\n    - Manage and organize thread knowledge base\n    - Remove outdated or incorrect files","operationId":"list_thread_files_threads__tid__files_get","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the thread.","title":"Tid"},"description":"The ID of the thread."}],"responses":{"200":{"description":"List of embedded files retrieved successfully","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Thread Files Threads  Tid  Files Get"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access denied to this thread"},"404":{"description":"Thread not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["threads"],"summary":"Upload and embed files for thread","description":"Upload one or more files to be processed and embedded into a thread's knowledge base.\n\n    **Supported file types:**\n    - All file types are supported\n    - PDF documents (.pdf) - fully parsed\n    - Microsoft Word documents (.docx, .doc) - fully parsed\n    - Text files (.txt, .md, .html, .csv) - fully parsed\n    - Other file types - attempted text extraction with fallback parser\n\n    **Process:**\n    1. Files are uploaded and converted to text\n    2. Content is chunked and vectorized\n    3. Embeddings are stored in the vector database\n    4. Thread can then reference this content in conversations\n\n    **Requirements:**\n    - Valid JWT token for authentication\n    - Thread must exist and user must have access\n    - No file size limits","operationId":"upload_thread_files_threads__tid__files_post","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the thread.","title":"Tid"},"description":"The ID of the thread."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_thread_files_threads__tid__files_post"}}}},"responses":{"200":{"description":"Files successfully uploaded and embedded","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Thread Files Threads  Tid  Files Post"}}}},"400":{"description":"Invalid configuration"},"401":{"description":"Authentication required"},"404":{"description":"Thread not found"},"503":{"description":"Vector store not available"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/{tid}/files/{file_id}":{"delete":{"tags":["threads"],"summary":"Delete embedded file from thread","description":"Remove a specific file from a thread's knowledge base.\n\n    **This action:**\n    - Permanently removes the file and all its chunks from the vector database\n    - Cannot be undone - the file will need to be re-uploaded to restore it\n    - Does not affect the thread's configuration, only its knowledge base\n\n    **Use cases:**\n    - Remove outdated or incorrect information\n    - Clean up thread knowledge base\n    - Manage storage usage","operationId":"delete_thread_file_threads__tid__files__file_id__delete","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string","description":"The ID of the thread.","title":"Tid"},"description":"The ID of the thread."},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the file to delete","title":"File Id"},"description":"The ID of the file to delete"}],"responses":{"200":{"description":"File deleted successfully","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Thread File Threads  Tid  Files  File Id  Delete"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access denied to this thread"},"404":{"description":"Thread or file not found"},"500":{"description":"Error deleting file"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/user/dashboard":{"options":{"tags":["user"],"summary":"Dashboard Options","description":"Handle CORS preflight requests for dashboard endpoint.","operationId":"dashboard_options_user_dashboard_options","parameters":[{"name":"Origin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["user"],"summary":"Get Dashboard Stats","description":"Get dashboard statistics for the authenticated user.","operationId":"get_dashboard_stats_user_dashboard_get","parameters":[{"name":"Origin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/user/threads":{"get":{"tags":["user"],"summary":"List Threads","description":"Get the user's thread usage.","operationId":"list_threads_user_threads_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/user/payments":{"get":{"tags":["user"],"summary":"Get Payment History","description":"Get the user's payment history.","operationId":"get_payment_history_user_payments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/user/info":{"get":{"tags":["user"],"summary":"Get User Info","description":"Return the authenticated user's info.","operationId":"get_user_info_user_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/price/agent":{"get":{"tags":["price"],"summary":"Get Agent Price","description":"Get the price of a thread.","operationId":"get_agent_price_price_agent_get","parameters":[{"name":"agent_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Agent Price Price Agent Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/price/token":{"get":{"tags":["price"],"summary":"Get Token Price","description":"Get the price of a token.","operationId":"get_token_price_price_token_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/checkout/create-checkout-session":{"post":{"tags":["checkout"],"summary":"Create checkout session","description":"Create a Stripe checkout session for purchasing tokens. Price is validated server-side.","operationId":"checkout_checkout_create_checkout_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checkout/webhook":{"post":{"tags":["checkout"],"summary":"Stripe webhook","description":"Handles Stripe webhook events. Called by Stripe, not by clients.","operationId":"payment_webhook_checkout_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}}}}},"/test/test-email":{"post":{"tags":["test"],"summary":"Test Email Sending","description":"Test endpoint to send a verification email","operationId":"test_email_sending_test_test_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/inactive-users":{"get":{"tags":["admin","admin"],"summary":"List inactive users for cleanup","description":"**ADMIN ONLY**: List users who have been inactive and are candidates for cleanup.\n\n    **Criteria for inactive users:**\n    - Created more than specified days ago (default: 60 days)\n    - Have 0 threads (never used the system)\n    - Optionally filter by provider (Epsimo, Google, etc.)\n\n    **Security:** Requires ADMIN_TOKEN environment variable to be set and provided.","operationId":"list_inactive_users_admin_inactive_users_get","parameters":[{"name":"min_days_old","in":"query","required":false,"schema":{"type":"integer","description":"Minimum days since user creation","default":60,"title":"Min Days Old"},"description":"Minimum days since user creation"},{"name":"max_results","in":"query","required":false,"schema":{"type":"integer","description":"Maximum number of results to return","default":100,"title":"Max Results"},"description":"Maximum number of results to return"},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by provider (Epsimo, Google, etc.)","title":"Provider"},"description":"Filter by provider (Epsimo, Google, etc.)"},{"name":"admin_token","in":"query","required":true,"schema":{"type":"string","description":"Admin authentication token","title":"Admin Token"},"description":"Admin authentication token"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InactiveUser"},"title":"Response List Inactive Users Admin Inactive Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/user-deletion-preview/{user_id}":{"get":{"tags":["admin","admin"],"summary":"Preview what will be deleted for a user","description":"**ADMIN ONLY**: Preview all data that will be deleted for a specific user.\n\n    **Returns detailed breakdown of:**\n    - Projects and their contents\n    - Threads in each project\n    - Assistants in each project\n    - Other associated data\n\n    **Use this before actual deletion to understand the impact.**","operationId":"preview_user_deletion_admin_user_deletion_preview__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"admin_token","in":"query","required":true,"schema":{"type":"string","description":"Admin authentication token","title":"Admin Token"},"description":"Admin authentication token"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/user/{user_id}":{"delete":{"tags":["admin","admin"],"summary":"Delete a specific user and all associated data","description":"**ADMIN ONLY**: Permanently delete a user and ALL associated data.\n\n    **⚠️ WARNING: This operation is irreversible!**\n\n    **What gets deleted:**\n    - User account\n    - All projects owned by the user\n    - All threads in those projects\n    - All assistants in those projects\n    - Password reset tokens\n    - Email verification codes\n\n    **Security:** Requires ADMIN_TOKEN and confirmation parameter.","operationId":"delete_user_admin_admin_user__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"confirm","in":"query","required":true,"schema":{"type":"boolean","description":"Must be true to confirm deletion","title":"Confirm"},"description":"Must be true to confirm deletion"},{"name":"admin_token","in":"query","required":true,"schema":{"type":"string","description":"Admin authentication token","title":"Admin Token"},"description":"Admin authentication token"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/cleanup-inactive-users":{"post":{"tags":["admin","admin"],"summary":"Bulk delete inactive users","description":"**ADMIN ONLY**: Bulk delete multiple inactive users based on criteria.\n\n    **⚠️ WARNING: This operation is irreversible!**\n\n    **Process:**\n    1. Finds users matching the criteria\n    2. Deletes each user and all associated data\n    3. Returns detailed summary of what was deleted\n\n    **Safety features:**\n    - Requires explicit confirmation\n    - Limits maximum deletions per operation\n    - Provides detailed logging\n    - Continues on individual failures","operationId":"cleanup_inactive_users_admin_cleanup_inactive_users_post","parameters":[{"name":"min_days_old","in":"query","required":false,"schema":{"type":"integer","description":"Minimum days since user creation","default":60,"title":"Min Days Old"},"description":"Minimum days since user creation"},{"name":"max_deletions","in":"query","required":false,"schema":{"type":"integer","description":"Maximum number of users to delete in one operation","default":10,"title":"Max Deletions"},"description":"Maximum number of users to delete in one operation"},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by provider (Epsimo, Google, etc.)","title":"Provider"},"description":"Filter by provider (Epsimo, Google, etc.)"},{"name":"confirm_cleanup","in":"query","required":true,"schema":{"type":"boolean","description":"Must be true to confirm bulk deletion","title":"Confirm Cleanup"},"description":"Must be true to confirm bulk deletion"},{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","description":"If true, only preview what would be deleted","default":false,"title":"Dry Run"},"description":"If true, only preview what would be deleted"},{"name":"admin_token","in":"query","required":true,"schema":{"type":"string","description":"Admin authentication token","title":"Admin Token"},"description":"Admin authentication token"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CleanupSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/system-stats":{"get":{"tags":["admin","admin"],"summary":"Get system-wide statistics","description":"**ADMIN ONLY**: Get comprehensive system statistics for monitoring.\n\n    **Includes:**\n    - Total users by provider\n    - Users by activity level\n    - Database size statistics\n    - Recent activity metrics","operationId":"get_system_stats_admin_system_stats_get","parameters":[{"name":"admin_token","in":"query","required":true,"schema":{"type":"string","description":"Admin authentication token","title":"Admin Token"},"description":"Admin authentication token"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/prices":{"get":{"tags":["admin"],"summary":"List All Available Models and Prices","description":"Retrieve all available models and their pricing information for administrative management.\n\n    **Required:** Admin authentication token\n\n    **Returns:** Comprehensive list of all available models including:\n    - **Configured models**: Models with custom pricing set in the database\n    - **Available models**: All models from the system that can be configured\n\n    **Model Status:**\n    - `configured: true` - Model has custom pricing in database\n    - `configured: false` - Model uses default pricing (1.0)","operationId":"list_agent_prices_admin_prices_get","parameters":[{"name":"admin_token","in":"query","required":true,"schema":{"type":"string","description":"Admin authentication token","title":"Admin Token"},"description":"Admin authentication token"}],"responses":{"200":{"description":"Prices retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListResponse"}}}},"403":{"description":"Invalid admin token"},"500":{"description":"Admin functionality not configured"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create New Agent Price","description":"Create a new price record for an agent type.\n\n    **Required:** Admin authentication token\n\n    **Request Body:**\n    - `agent_type`: Name of the agent type (e.g., \"GPT 4\", \"Claude 3.5 (Sonnet)\")\n    - `price`: Price value (must be greater than 0)\n\n    **Note:** Use this for new agent types not yet in the system.","operationId":"create_agent_price_admin_prices_post","parameters":[{"name":"admin_token","in":"query","required":true,"schema":{"type":"string","description":"Admin authentication token","title":"Admin Token"},"description":"Admin authentication token"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPrice"}}}},"201":{"description":"Price created successfully"},"403":{"description":"Invalid admin token"},"409":{"description":"Agent type already exists"},"422":{"description":"Invalid request data"},"500":{"description":"Admin functionality not configured"}}}},"/admin/prices/{agent_type}":{"get":{"tags":["admin"],"summary":"Get Specific Agent Price","description":"Retrieve pricing information for a specific agent type.\n\n    **Required:** Admin authentication token\n\n    **Path Parameters:**\n    - `agent_type`: The agent type to retrieve (e.g., \"GPT 4\", \"Claude 3.5 (Sonnet)\")","operationId":"get_agent_price_admin_prices__agent_type__get","parameters":[{"name":"agent_type","in":"path","required":true,"schema":{"type":"string","title":"Agent Type"}},{"name":"admin_token","in":"query","required":true,"schema":{"type":"string","description":"Admin authentication token","title":"Admin Token"},"description":"Admin authentication token"}],"responses":{"200":{"description":"Price retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPrice"}}}},"403":{"description":"Invalid admin token"},"404":{"description":"Agent type not found"},"500":{"description":"Admin functionality not configured"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Update Agent Price","description":"Update the price for a specific agent type.\n\n    **Required:** Admin authentication token\n\n    **Path Parameters:**\n    - `agent_type`: The agent type to update\n\n    **Request Body:**\n    - `price`: New price (must be greater than 0)\n\n    **Note:** This operation is immediately effective for new requests.","operationId":"update_agent_price_admin_prices__agent_type__put","parameters":[{"name":"agent_type","in":"path","required":true,"schema":{"type":"string","title":"Agent Type"}},{"name":"admin_token","in":"query","required":true,"schema":{"type":"string","description":"Admin authentication token","title":"Admin Token"},"description":"Admin authentication token"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceUpdateRequest"}}}},"responses":{"200":{"description":"Price updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPrice"}}}},"403":{"description":"Invalid admin token"},"404":{"description":"Agent type not found"},"422":{"description":"Invalid price value"},"500":{"description":"Admin functionality not configured"}}},"delete":{"tags":["admin"],"summary":"Delete Agent Price","description":"Delete the price record for a specific agent type.\n\n    **Required:** Admin authentication token\n\n    **Path Parameters:**\n    - `agent_type`: The agent type to delete\n\n    **Warning:** This will cause the system to fall back to default pricing (1.0).\n    Only delete if you're sure the agent type is no longer used.","operationId":"delete_agent_price_admin_prices__agent_type__delete","parameters":[{"name":"agent_type","in":"path","required":true,"schema":{"type":"string","title":"Agent Type"}},{"name":"admin_token","in":"query","required":true,"schema":{"type":"string","description":"Admin authentication token","title":"Admin Token"},"description":"Admin authentication token"}],"responses":{"200":{"description":"Price deleted successfully","content":{"application/json":{"schema":{}}}},"403":{"description":"Invalid admin token"},"404":{"description":"Agent type not found"},"500":{"description":"Admin functionality not configured"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/user/by-email/{email}":{"get":{"tags":["admin","admin"],"summary":"Get user thread counter info by email","description":"**ADMIN ONLY**: Get a user's thread_counter and max_thread_counter by email address.\n    \n    **Security:** Requires ADMIN_TOKEN environment variable to be set and provided.\n    \n    **Path Parameters:**\n    - `email`: The email address of the user to query\n    \n    **Returns:**\n    - User ID, email, thread_counter, max_thread_counter, and actual_thread_count (actual threads in database)","operationId":"get_user_counter_by_email_admin_user_by_email__email__get","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","description":"Email address of the user","format":"email","title":"Email"},"description":"Email address of the user"},{"name":"admin_token","in":"query","required":true,"schema":{"type":"string","description":"Admin authentication token","title":"Admin Token"},"description":"Admin authentication token"}],"responses":{"200":{"description":"User counter info retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCounterInfo"}}}},"403":{"description":"Invalid admin token"},"404":{"description":"User not found"},"500":{"description":"Admin functionality not configured"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/user/{user_id}/max-thread-counter":{"put":{"tags":["admin","admin"],"summary":"Update user max thread counter","description":"**ADMIN ONLY**: Update a user's max_thread_counter value.\n    \n    **Security:** Requires ADMIN_TOKEN environment variable to be set and provided.\n    \n    **Security Features:**\n    - Atomic database updates with row-level locking to prevent race conditions\n    - Input validation (non-negative, max 1,000,000)\n    - Admin token verification required\n    \n    **Path Parameters:**\n    - `user_id`: The UUID of the user to update\n    \n    **Request Body:**\n    - `max_thread_counter`: New maximum thread counter value (0 to 1,000,000)\n    \n    **Query Parameters:**\n    - `admin_token`: Admin authentication token\n    \n    **Returns:**\n    - Updated user information including thread_counter and max_thread_counter","operationId":"update_user_max_thread_counter_admin_user__user_id__max_thread_counter_put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","description":"User ID to update","title":"User Id"},"description":"User ID to update"},{"name":"admin_token","in":"query","required":true,"schema":{"type":"string","description":"Admin authentication token","title":"Admin Token"},"description":"Admin authentication token"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMaxThreadCounterRequest"}}}},"responses":{"200":{"description":"Max thread counter updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMaxThreadCounterResponse"}}}},"400":{"description":"Invalid max_thread_counter value"},"403":{"description":"Invalid admin token"},"404":{"description":"User not found"},"500":{"description":"Internal server error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/test":{"get":{"tags":["tools"],"summary":"Test endpoint","description":"Simple test endpoint to verify the route is working.","operationId":"test_tools_endpoint_tools_test_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tools/schema":{"get":{"tags":["tools"],"summary":"Get raw tool schema","description":"Retrieve the raw JSON schema for all tools.\n    \n    This endpoint returns the complete schema structure used by the frontend\n    for tool configuration and validation.\n    \n    **Returns:**\n    Raw JSON schema array in the format expected by the frontend UI.","operationId":"get_tools_schema_endpoint_tools_schema_get","responses":{"200":{"description":"Tool schema retrieved successfully","content":{"application/json":{"schema":{}}}},"401":{"description":"Authentication required"}}}},"/tools/":{"get":{"tags":["tools"],"summary":"List all available tools","description":"Retrieve all available tools that can be added to assistants.\n    \n    **Returns:**\n    A list of all available tools with their schemas, including:\n    - Built-in tools (search, retrieval, etc.)\n    - Custom tools (if any are configured)\n    \n    **Use cases:**\n    - Display available tools in the assistant configuration UI\n    - Get tool schemas for validation\n    - Discover what tools are available for assistants","operationId":"list_tools_tools__get","responses":{"200":{"description":"List of tools retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolListResponse"}}}},"401":{"description":"Authentication required"}}}},"/tools/{tool_type}":{"get":{"tags":["tools"],"summary":"Get tool details by type","description":"Retrieve detailed information about a specific tool by its type identifier.\n    \n    **Tool Types:**\n    - `ddg_search` - DuckDuckGo Search\n    - `retrieval` - File retrieval\n    - `search_tavily` - Tavily search\n    - `search_tavily_answer` - Tavily short answer\n    - `arxiv` - Arxiv search\n    - `pubmed` - PubMed search\n    - `wikipedia` - Wikipedia search\n    - `dall_e` - DALL-E image generation\n    - `lead_analysis` - Lead analysis\n    - `action_server_by_sema4ai` - Action Server\n    - `mcp_server` - MCP Server\n    - Custom tools (prefixed with `custom_`)\n    \n    **Returns:**\n    Detailed tool schema including configuration requirements.","operationId":"get_tool_tools__tool_type__get","parameters":[{"name":"tool_type","in":"path","required":true,"schema":{"type":"string","description":"The type identifier of the tool (e.g., 'ddg_search', 'retrieval').","title":"Tool Type"},"description":"The type identifier of the tool (e.g., 'ddg_search', 'retrieval')."}],"responses":{"200":{"description":"Tool details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSchema"}}}},"401":{"description":"Authentication required"},"404":{"description":"Tool not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/completions":{"options":{"tags":["openai-v1"],"summary":"V1 Chat Completions Options","description":"Handle CORS preflight requests for /v1/chat/completions endpoint.","operationId":"v1_chat_completions_options_v1_chat_completions_options","parameters":[{"name":"Origin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["openai-v1"],"summary":"V1 Chat Completions","description":"Direct /v1/chat/completions endpoint for Typebot compatibility.\n\nThis endpoint proxies to /public/openai/v1/chat/completions to match\nOpenAI's standard API path structure that Typebot expects.\n\n**Usage in Typebot:**\n- Base URL: `https://api.epsimoagents.com`\n- API Key: Your public assistant token (from `type==agent/public_token`)\n\nTypebot will automatically call `/v1/chat/completions` on the base URL.","operationId":"v1_chat_completions_v1_chat_completions_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Public-Bot-Token"}},{"name":"User-Agent","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User-Agent"}},{"name":"Origin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}},{"name":"Referer","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAICompatibleChatCompletionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/assistants":{"options":{"tags":["openai-v1"],"summary":"V1 Assistants Options","description":"Handle CORS preflight requests for /v1/assistants endpoint.","operationId":"v1_assistants_options_v1_assistants_options","parameters":[{"name":"Origin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["openai-v1"],"summary":"V1 List Assistants","description":"Direct /v1/assistants endpoint for Typebot compatibility.\n\nThis endpoint proxies to /public/openai/v1/assistants to match\nOpenAI's standard API path structure that Typebot expects.\n\nReturns the assistant associated with the provided token in OpenAI's format.\nTypebot uses this endpoint to populate the assistant dropdown.","operationId":"v1_list_assistants_v1_assistants_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Public-Bot-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/assistants/{assistant_id}":{"get":{"tags":["openai-v1"],"summary":"V1 Get Assistant","description":"Direct /v1/assistants/{assistant_id} endpoint for Typebot compatibility.\n\nThis endpoint proxies to /public/openai/v1/assistants/{assistant_id} to match\nOpenAI's standard API path structure that Typebot expects.\n\nReturns a specific assistant in OpenAI's format.","operationId":"v1_get_assistant_v1_assistants__assistant_id__get","parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","description":"The assistant ID","title":"Assistant Id"},"description":"The assistant ID"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Public-Bot-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/threads/{thread_id}/messages":{"post":{"tags":["openai-v1"],"summary":"V1 Thread Create Message","description":"Direct /v1/threads/{thread_id}/messages endpoint for Typebot compatibility.\n\nThis endpoint proxies to /public/openai/v1/threads/{thread_id}/messages to match\nOpenAI's standard API path structure that Typebot expects.\n\nCreates a message in a thread (OpenAI Assistants API compatible).","operationId":"v1_thread_create_message_v1_threads__thread_id__messages_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","description":"Thread ID","title":"Thread Id"},"description":"Thread ID"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Public-Bot-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIThreadMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/threads/{thread_id}/runs":{"post":{"tags":["openai-v1"],"summary":"V1 Thread Create Run","description":"Direct /v1/threads/{thread_id}/runs endpoint for Typebot compatibility.\n\nThis endpoint proxies to /public/openai/v1/threads/{thread_id}/runs to match\nOpenAI's standard API path structure that Typebot expects.\n\nCreates and runs a thread (OpenAI Assistants API compatible).\nIf stream=True, returns SSE stream of run events.\nOtherwise returns a run object.","operationId":"v1_thread_create_run_v1_threads__thread_id__runs_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","description":"Thread ID","title":"Thread Id"},"description":"Thread ID"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Public-Bot-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Public-Bot-Token"}},{"name":"Origin","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIRunCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/test-mcp":{"post":{"summary":"Test Mcp Tool","description":"Test MCP tool execution directly in the live application environment.\n\nThis endpoint bypasses the chat workflow and tests MCP tools directly,\nhelping to identify if timeout issues are environment-specific.","operationId":"test_mcp_tool_test_mcp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPTestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/test-mcp-simple":{"get":{"summary":"Test Mcp Simple","description":"Simple MCP test with predefined parameters for quick testing.","operationId":"test_mcp_simple_test_mcp_simple_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPTestResponse"}}}}}}},"/test-mcp-debug":{"post":{"summary":"Test Mcp Debug","description":"Detailed debug endpoint to capture MCP initialization errors.","operationId":"test_mcp_debug_test_mcp_debug_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Test Mcp Debug Test Mcp Debug Post"}}}}}}},"/test-mcp-read-graph":{"post":{"summary":"Test Mcp Read Graph","description":"Test the read_graph tool which should be very fast.","operationId":"test_mcp_read_graph_test_mcp_read_graph_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPTestResponse"}}}}}}},"/test-mcp-search":{"post":{"summary":"Test Mcp Search","description":"Test the search_nodes tool which should be fast.","operationId":"test_mcp_search_test_mcp_search_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPTestResponse"}}}}}}},"/test-mcp-batch-entities":{"post":{"summary":"Test Mcp Batch Entities","description":"Test creating multiple entities to see if batch size affects timeout.","operationId":"test_mcp_batch_entities_test_mcp_batch_entities_post","parameters":[{"name":"batch_size","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Batch Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sse":{"get":{"tags":["mcp"],"summary":"Mcp Sse Stream","description":"MCP SSE endpoint for establishing Server-Sent Events connection.\n\nThis endpoint allows MCP clients to establish a persistent connection\nand receive responses via Server-Sent Events.","operationId":"mcp_sse_stream_sse_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sse/message":{"post":{"tags":["mcp"],"summary":"Mcp Message Handler","description":"Handle MCP messages sent via POST.\n\nThis endpoint receives MCP protocol messages and processes them,\nsending responses back via the SSE connection.","operationId":"mcp_message_handler_sse_message_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/assistants/{assistant_id}/files":{"get":{"tags":["assistants"],"summary":"List Embedded Files","description":"List all embedded files for an assistant (by assistant_id/namespace).","operationId":"list_embedded_files_assistants__assistant_id__files_get","parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","title":"Assistant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest":{"post":{"tags":["files"],"summary":"Upload and process files for AI assistant knowledge base","description":"Upload one or more files to be processed and ingested into an AI assistant's knowledge base.\n\n    **Supported file types:**\n    - All file types are supported\n    - PDF documents (.pdf) - fully parsed\n    - Microsoft Word documents (.docx, .doc) - fully parsed\n    - Text files (.txt, .md, .html, .csv) - fully parsed\n    - Other file types - attempted text extraction with fallback parser\n\n    **Process:**\n    1. Files are uploaded and converted to text\n    2. Content is chunked and vectorized\n    3. Embeddings are stored in the vector database\n    4. Assistant can then reference this content in conversations\n\n    **Requirements:**\n    - Valid JWT token for authentication\n    - Assistant ID or Thread ID in the config\n    - No file size limits","operationId":"ingest_files_ingest_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ingest_files_ingest_post"}}},"required":true},"responses":{"200":{"description":"Files successfully ingested and processed","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ingest Files Ingest Post"}}}},"400":{"description":"Invalid configuration"},"401":{"description":"Authentication required"},"404":{"description":"Assistant or thread not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["health"],"summary":"Check API health status","description":"Simple health check endpoint to verify the API is running and responsive.","operationId":"health_health_get","responses":{"200":{"description":"API is healthy and operational","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}},"503":{"description":"API is experiencing issues"}}}},"/health/db":{"get":{"tags":["health"],"summary":"Check database connection health","description":"Check the health and connectivity of the PostgreSQL database.\n    \n    This endpoint performs a simple database query to verify:\n    - Database connection pool is active\n    - Database is accessible\n    - Basic queries can be executed\n    \n    **Response statuses:**\n    - `healthy` - Database is connected and responding\n    - `error` - Database connection or query failed","operationId":"db_health_health_db_get","responses":{"200":{"description":"Database health status retrieved successfully","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Db Health Health Db Get"}}}},"503":{"description":"Database is not available"}}}},"/health/tool/{tool_type}":{"get":{"tags":["health"],"summary":"Check specific tool health status","description":"Check the health and availability of specific AI tools and integrations.\n\n    **Available tools to check:**\n    - `retrieval` - Vector store and document search functionality\n    - `ddg_search` - DuckDuckGo web search integration\n    - `tavily` - Tavily advanced search with sources\n    - `tavily_answer` - Tavily answer-focused search\n    - `dall_e` - OpenAI DALL-E image generation\n    - `action_server` - Sema4.ai Action Server integration\n    - `arxiv` - Academic paper search via ArXiv\n    - `pubmed` - Medical literature search via PubMed\n    - `wikipedia` - Wikipedia encyclopedia search\n\n    **Response statuses:**\n    - `healthy` - Tool is working correctly\n    - `error` - Tool has configuration or connectivity issues\n    - `needs_config` - Tool requires additional configuration","operationId":"tool_health_health_tool__tool_type__get","parameters":[{"name":"tool_type","in":"path","required":true,"schema":{"type":"string","title":"Tool Type"}}],"responses":{"200":{"description":"Tool health status retrieved successfully","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Tool Health Health Tool  Tool Type  Get"}}}},"400":{"description":"Invalid tool type specified"},"500":{"description":"Error checking tool health"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health/llm/{model_name}":{"get":{"tags":["health"],"summary":"Check LLM model health status","description":"Check the health and availability of specific LLM models.\n\n    This endpoint verifies that the specified LLM model can be properly\n    initialized and configured. It's useful for debugging model-specific issues.","operationId":"llm_health_health_llm__model_name__get","parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string","title":"Model Name"}}],"responses":{"200":{"description":"LLM health status retrieved successfully","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Llm Health Health Llm  Model Name  Get"}}}},"400":{"description":"Invalid model name specified"},"500":{"description":"Error checking LLM health"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AIMessage":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"}],"title":"Content"},"additional_kwargs":{"additionalProperties":true,"type":"object","title":"Additional Kwargs"},"response_metadata":{"additionalProperties":true,"type":"object","title":"Response Metadata"},"type":{"type":"string","const":"ai","title":"Type","default":"ai"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"tool_calls":{"items":{"$ref":"#/components/schemas/ToolCall"},"type":"array","title":"Tool Calls","default":[]},"invalid_tool_calls":{"items":{"$ref":"#/components/schemas/InvalidToolCall"},"type":"array","title":"Invalid Tool Calls","default":[]},"usage_metadata":{"anyOf":[{"$ref":"#/components/schemas/UsageMetadata"},{"type":"null"}]}},"additionalProperties":true,"type":"object","required":["content"],"title":"AIMessage","description":"Message from an AI.\n\nAn `AIMessage` is returned from a chat model as a response to a prompt.\n\nThis message represents the output of the model and consists of both\nthe raw output as returned by the model and standardized fields\n(e.g., tool calls, usage metadata) added by the LangChain framework."},"AIMessageChunk":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"}],"title":"Content"},"additional_kwargs":{"additionalProperties":true,"type":"object","title":"Additional Kwargs"},"response_metadata":{"additionalProperties":true,"type":"object","title":"Response Metadata"},"type":{"type":"string","const":"AIMessageChunk","title":"Type","default":"AIMessageChunk"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"tool_calls":{"items":{"$ref":"#/components/schemas/ToolCall"},"type":"array","title":"Tool Calls","default":[]},"invalid_tool_calls":{"items":{"$ref":"#/components/schemas/InvalidToolCall"},"type":"array","title":"Invalid Tool Calls","default":[]},"usage_metadata":{"anyOf":[{"$ref":"#/components/schemas/UsageMetadata"},{"type":"null"}]},"tool_call_chunks":{"items":{"$ref":"#/components/schemas/ToolCallChunk"},"type":"array","title":"Tool Call Chunks","default":[]},"chunk_position":{"anyOf":[{"type":"string","const":"last"},{"type":"null"}],"title":"Chunk Position"}},"additionalProperties":true,"type":"object","required":["content"],"title":"AIMessageChunk","description":"Message chunk from an AI (yielded when streaming)."},"AgentPrice":{"properties":{"assistant_token_id":{"type":"string","title":"Assistant Token Id"},"agent_type":{"type":"string","title":"Agent Type"},"price":{"type":"number","title":"Price"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"configured":{"type":"boolean","title":"Configured","default":true}},"type":"object","required":["assistant_token_id","agent_type","price","created_at"],"title":"AgentPrice"},"Assistant":{"properties":{"assistant_id":{"type":"string","title":"Assistant Id"},"project_id":{"type":"string","title":"Project Id"},"name":{"type":"string","title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"public":{"type":"boolean","title":"Public"}},"type":"object","required":["assistant_id","project_id","name","config","updated_at","public"],"title":"Assistant","description":"Assistant model."},"AssistantOpenAIAccountPayload":{"properties":{"label":{"type":"string","title":"Label","description":"Human-readable label for the OpenAI account","default":"My account","example":"My account"},"api_key":{"type":"string","title":"Api Key","description":"OpenAI API key (will be stored securely)","example":"sk-..."},"base_url":{"type":"string","title":"Base Url","description":"Base URL for OpenAI API","default":"https://api.openai.com/v1","example":"https://api.openai.com/v1"}},"type":"object","required":["api_key"],"title":"AssistantOpenAIAccountPayload","description":"Payload for setting OpenAI account configuration for a public assistant."},"AssistantPayload":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Human-readable name for the assistant (e.g., 'Customer Support Bot', 'Code Review Assistant')","example":"My AI Assistant"},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"\n        Configuration object containing assistant behavior settings, including:\n        - model: AI model to use (e.g., 'gpt-4', 'claude-3')\n        - temperature: Response creativity (0.0-1.0)\n        - system_prompt: Instructions defining assistant behavior\n        - tools: List of enabled tools and integrations\n        - max_tokens: Maximum response length\n        ","example":{"max_tokens":2000,"model":"gpt-4","system_prompt":"You are a helpful AI assistant.","temperature":0.7,"tools":["web_search","calculator"]}},"public":{"type":"boolean","title":"Public","description":"Whether this assistant should be publicly accessible to all users. Public assistants appear in the community gallery.","default":false,"example":false}},"type":"object","required":["name","config"],"title":"AssistantPayload","description":"Payload for creating or updating an AI assistant.\n\nThis model defines the structure for assistant creation and modification requests."},"AssistantProjectUpdateRequest":{"properties":{"project_id":{"type":"string","title":"Project Id","description":"The ID of the project to move the assistant to","example":"123e4567-e89b-12d3-a456-426614174000"}},"type":"object","required":["project_id"],"title":"AssistantProjectUpdateRequest","description":"Payload for updating an assistant's project."},"Body_ingest_files_ingest_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"config":{"type":"string","title":"Config","description":"JSON configuration containing assistant_id or thread_id"}},"type":"object","required":["files","config"],"title":"Body_ingest_files_ingest_post"},"Body_upload_assistant_files_assistants__aid__files_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files","description":"Files to upload and embed"}},"type":"object","required":["files"],"title":"Body_upload_assistant_files_assistants__aid__files_post"},"Body_upload_thread_files_threads__tid__files_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files","description":"Files to upload and embed"}},"type":"object","required":["files"],"title":"Body_upload_thread_files_threads__tid__files_post"},"ChatMessage":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"}],"title":"Content"},"additional_kwargs":{"additionalProperties":true,"type":"object","title":"Additional Kwargs"},"response_metadata":{"additionalProperties":true,"type":"object","title":"Response Metadata"},"type":{"type":"string","const":"chat","title":"Type","default":"chat"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"role":{"type":"string","title":"Role"}},"additionalProperties":true,"type":"object","required":["content","role"],"title":"ChatMessage","description":"Message that can be assigned an arbitrary speaker (i.e. role)."},"ChatMessageChunk":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"}],"title":"Content"},"additional_kwargs":{"additionalProperties":true,"type":"object","title":"Additional Kwargs"},"response_metadata":{"additionalProperties":true,"type":"object","title":"Response Metadata"},"type":{"type":"string","const":"ChatMessageChunk","title":"Type","default":"ChatMessageChunk"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"role":{"type":"string","title":"Role"}},"additionalProperties":true,"type":"object","required":["content","role"],"title":"ChatMessageChunk","description":"Chat Message chunk."},"CheckoutRequest":{"properties":{"quantity":{"type":"integer","maximum":100000.0,"minimum":1.0,"title":"Quantity","description":"Number of tokens to purchase"}},"type":"object","required":["quantity"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"}},"type":"object","required":["id","url"],"title":"CheckoutResponse"},"CleanupSummary":{"properties":{"total_users_found":{"type":"integer","title":"Total Users Found"},"total_users_deleted":{"type":"integer","title":"Total Users Deleted"},"total_projects_deleted":{"type":"integer","title":"Total Projects Deleted"},"total_threads_deleted":{"type":"integer","title":"Total Threads Deleted"},"total_assistants_deleted":{"type":"integer","title":"Total Assistants Deleted"},"deleted_users":{"items":{"$ref":"#/components/schemas/UserDeletionSummary"},"type":"array","title":"Deleted Users"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["total_users_found","total_users_deleted","total_projects_deleted","total_threads_deleted","total_assistants_deleted","deleted_users","errors"],"title":"CleanupSummary"},"CreateRunPayload":{"properties":{"thread_id":{"type":"string","title":"Thread Id","description":"Thread ID for the conversation"},"input":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input","description":"Input messages. List of message objects or single message object."},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","description":"Runtime configuration including assistant_id, thread_id, user_id, and agent config"}},"type":"object","required":["thread_id"],"title":"CreateRunPayload","description":"Payload for creating a run (streaming or non-streaming).\n\nAttributes:\n    thread_id: The thread ID to run the conversation in\n    input: Optional input messages. Can be:\n        - List of message dicts: [{\"type\": \"human\", \"content\": \"Hello\"}]\n        - Single message dict: {\"type\": \"human\", \"content\": \"Hello\"}\n        - Empty dict (uses thread history)\n    config: Optional runtime configuration. Typically includes:\n        - assistant_id: Assistant to use\n        - thread_id: Thread ID (redundant with thread_id field, but kept for compatibility)\n        - user_id: User ID\n        - Other agent-specific config (tools, system_message, etc.)"},"DeleteUserRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"User's email address for confirmation","example":"user@example.com"}},"type":"object","required":["email"],"title":"DeleteUserRequest","description":"Delete user request payload."},"ExchangeResponse":{"properties":{"token":{"type":"string","title":"Token","description":"EpsimoAI JWT token signed with RS256, valid for 1 hour","example":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."}},"type":"object","required":["token"],"title":"ExchangeResponse","description":"Response model for JWT exchange endpoint."},"FeedbackCreateRequest":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"key":{"type":"string","title":"Key"},"score":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"boolean"},{"type":"null"}],"title":"Score"},"value":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"boolean"},{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"}},"type":"object","required":["run_id","key"],"title":"FeedbackCreateRequest","description":"Shared information between create requests of feedback and feedback objects"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"User's email address","example":"user@example.com"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest","description":"Forgot password request payload."},"FunctionMessage":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"}],"title":"Content"},"additional_kwargs":{"additionalProperties":true,"type":"object","title":"Additional Kwargs"},"response_metadata":{"additionalProperties":true,"type":"object","title":"Response Metadata"},"type":{"type":"string","const":"function","title":"Type","default":"function"},"name":{"type":"string","title":"Name"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"additionalProperties":true,"type":"object","required":["content","name"],"title":"FunctionMessage","description":"Message for passing the result of executing a tool back to a model.\n\n`FunctionMessage` are an older version of the `ToolMessage` schema, and\ndo not contain the `tool_call_id` field.\n\nThe `tool_call_id` field is used to associate the tool call request with the\ntool call response. Useful in situations where a chat model is able\nto request multiple tool calls in parallel."},"FunctionMessageChunk":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"}],"title":"Content"},"additional_kwargs":{"additionalProperties":true,"type":"object","title":"Additional Kwargs"},"response_metadata":{"additionalProperties":true,"type":"object","title":"Response Metadata"},"type":{"type":"string","const":"FunctionMessageChunk","title":"Type","default":"FunctionMessageChunk"},"name":{"type":"string","title":"Name"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"additionalProperties":true,"type":"object","required":["content","name"],"title":"FunctionMessageChunk","description":"Function Message chunk."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HumanMessage":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"}],"title":"Content"},"additional_kwargs":{"additionalProperties":true,"type":"object","title":"Additional Kwargs"},"response_metadata":{"additionalProperties":true,"type":"object","title":"Response Metadata"},"type":{"type":"string","const":"human","title":"Type","default":"human"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"additionalProperties":true,"type":"object","required":["content"],"title":"HumanMessage","description":"Message from the user.\n\nA `HumanMessage` is a message that is passed in from a user to the model.\n\nExample:\n    ```python\n    from langchain_core.messages import HumanMessage, SystemMessage\n\n    messages = [\n        SystemMessage(content=\"You are a helpful assistant! Your name is Bob.\"),\n        HumanMessage(content=\"What is your name?\"),\n    ]\n\n    # Instantiate a chat model and invoke it with the messages\n    model = ...\n    print(model.invoke(messages))\n    ```"},"HumanMessageChunk":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"}],"title":"Content"},"additional_kwargs":{"additionalProperties":true,"type":"object","title":"Additional Kwargs"},"response_metadata":{"additionalProperties":true,"type":"object","title":"Response Metadata"},"type":{"type":"string","const":"HumanMessageChunk","title":"Type","default":"HumanMessageChunk"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"additionalProperties":true,"type":"object","required":["content"],"title":"HumanMessageChunk","description":"Human Message chunk."},"InactiveUser":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"days_since_creation":{"type":"integer","title":"Days Since Creation"},"thread_count":{"type":"integer","title":"Thread Count"},"project_count":{"type":"integer","title":"Project Count"},"assistant_count":{"type":"integer","title":"Assistant Count"},"last_activity":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity"},"provider":{"type":"string","title":"Provider"}},"type":"object","required":["user_id","email","created_at","days_since_creation","thread_count","project_count","assistant_count","last_activity","provider"],"title":"InactiveUser"},"InputTokenDetails":{"properties":{"audio":{"type":"integer","title":"Audio"},"cache_creation":{"type":"integer","title":"Cache Creation"},"cache_read":{"type":"integer","title":"Cache Read"}},"additionalProperties":true,"type":"object","title":"InputTokenDetails","description":"Breakdown of input token counts.\n\nDoes *not* need to sum to full input token count. Does *not* need to have all keys.\n\nExample:\n    ```python\n    {\n        \"audio\": 10,\n        \"cache_creation\": 200,\n        \"cache_read\": 100,\n    }\n    ```\n\nMay also hold extra provider-specific keys.\n\n!!! version-added \"Added in `langchain-core` 0.3.9\""},"InvalidToolCall":{"properties":{"type":{"type":"string","const":"invalid_tool_call","title":"Type"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"args":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Args"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"index":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Index"},"extras":{"additionalProperties":true,"type":"object","title":"Extras"}},"additionalProperties":true,"type":"object","required":["type","id","name","args","error"],"title":"InvalidToolCall","description":"Allowance for errors made by LLM.\n\nHere we add an `error` key to surface errors made during generation\n(e.g., invalid JSON arguments.)"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"User's email address for authentication","example":"user@example.com"},"password":{"type":"string","minLength":1,"title":"Password","description":"User's password","example":"your-secure-password"}},"type":"object","required":["email","password"],"title":"LoginRequest","description":"Login request payload with email and password."},"LoginResponse":{"properties":{"jwt_token":{"type":"string","title":"Jwt Token","description":"JWT authentication token valid for 30 days","example":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMTIzIiwicHJvamVjdF9pZCI6IjQ1NiIsImFsZyI6IkhTMjU2IiwiaXNzIjoiZXBzaW1vYWkiLCJhdWQiOiJlcHNpbW9haSIsImV4cCI6MTY5ODc2ODAwMH0.example_signature"},"main_agent_id":{"type":"string","title":"Main Agent Id","description":"ID of the main agent for direct chat navigation","example":"123e4567-e89b-12d3-a456-426614174000"},"main_thread_id":{"type":"string","title":"Main Thread Id","description":"ID of the main thread for direct chat navigation","example":"987e6543-e21b-34c5-d678-123456789abc"}},"type":"object","required":["jwt_token","main_agent_id","main_thread_id"],"title":"LoginResponse","description":"Login response containing JWT token and main agent information."},"MCPTestRequest":{"properties":{"connection_type":{"type":"string","title":"Connection Type","default":"stdio"},"command":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Command","default":["npx","-y","@modelcontextprotocol/server-memory"]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"tool_name":{"type":"string","title":"Tool Name","default":"create_entities"},"arguments":{"additionalProperties":true,"type":"object","title":"Arguments","default":{"entities":[{"entityType":"app_test","name":"test_entity_from_app","observations":["Testing MCP from live application"]}]}}},"type":"object","title":"MCPTestRequest","description":"Request model for MCP testing"},"MCPTestResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"execution_time_seconds":{"type":"number","title":"Execution Time Seconds"},"tool_name":{"type":"string","title":"Tool Name"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"debug_info":{"additionalProperties":true,"type":"object","title":"Debug Info","default":{}}},"type":"object","required":["success","execution_time_seconds","tool_name"],"title":"MCPTestResponse","description":"Response model for MCP testing"},"OpenAICompatibleChatCompletionRequest":{"properties":{"model":{"type":"string","title":"Model","description":"Model name (not used, kept for compatibility)","default":"gpt-4o"},"messages":{"items":{"$ref":"#/components/schemas/OpenAICompatibleChatMessage"},"type":"array","title":"Messages","description":"List of messages"},"stream":{"type":"boolean","title":"Stream","description":"Whether to stream the response","default":true},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","description":"Temperature (optional)"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens","description":"Max tokens (optional)"}},"type":"object","required":["messages"],"title":"OpenAICompatibleChatCompletionRequest","description":"OpenAI-compatible chat completion request."},"OpenAICompatibleChatMessage":{"properties":{"role":{"type":"string","title":"Role","description":"Message role: system, user, or assistant"},"content":{"type":"string","title":"Content","description":"Message content"}},"type":"object","required":["role","content"],"title":"OpenAICompatibleChatMessage","description":"OpenAI-compatible chat message format."},"OpenAIRunCreateRequest":{"properties":{"assistant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Id","description":"Assistant ID (optional - will be extracted from token if empty)","default":""},"stream":{"type":"boolean","title":"Stream","description":"Whether to stream the response","default":true},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model override"}},"type":"object","title":"OpenAIRunCreateRequest","description":"OpenAI-compatible run create request."},"OpenAIThreadMessageRequest":{"properties":{"role":{"type":"string","title":"Role","description":"Message role: user or assistant"},"content":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"}],"title":"Content","description":"Message content (string or array of content blocks)"}},"type":"object","required":["role","content"],"title":"OpenAIThreadMessageRequest","description":"OpenAI-compatible thread message request."},"OutputTokenDetails":{"properties":{"audio":{"type":"integer","title":"Audio"},"reasoning":{"type":"integer","title":"Reasoning"}},"additionalProperties":true,"type":"object","title":"OutputTokenDetails","description":"Breakdown of output token counts.\n\nDoes *not* need to sum to full output token count. Does *not* need to have all keys.\n\nExample:\n    ```python\n    {\n        \"audio\": 10,\n        \"reasoning\": 200,\n    }\n    ```\n\nMay also hold extra provider-specific keys.\n\n!!! version-added \"Added in `langchain-core` 0.3.9\""},"PriceCreateRequest":{"properties":{"agent_type":{"type":"string","maxLength":255,"minLength":1,"title":"Agent Type"},"price":{"type":"number","exclusiveMinimum":0.0,"title":"Price","description":"Price must be greater than 0"}},"type":"object","required":["agent_type","price"],"title":"PriceCreateRequest"},"PriceListResponse":{"properties":{"prices":{"items":{"$ref":"#/components/schemas/AgentPrice"},"type":"array","title":"Prices"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["prices","total_count"],"title":"PriceListResponse"},"PriceUpdateRequest":{"properties":{"price":{"type":"number","exclusiveMinimum":0.0,"title":"Price","description":"Price must be greater than 0"}},"type":"object","required":["price"],"title":"PriceUpdateRequest"},"Project":{"properties":{"project_id":{"type":"string","title":"Project Id"},"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"}},"type":"object","required":["project_id","user_id","name","description"],"title":"Project"},"ProjectCreateRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Project name (e.g., 'Customer Support', 'Research Project')","example":"My AI Project"},"description":{"type":"string","maxLength":500,"minLength":1,"title":"Description","description":"Brief description of the project's purpose and scope","example":"A project for managing customer support AI assistants"}},"type":"object","required":["name","description"],"title":"ProjectCreateRequest","description":"Request model for creating a new project."},"ProjectDeleteResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Status of the deletion operation","example":"deleted"},"project_id":{"type":"string","title":"Project Id","description":"ID of the deleted project","example":"123e4567-e89b-12d3-a456-426614174000"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Additional message about the deletion","example":"Project and all associated resources have been deleted"},"threads":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Threads","description":"List of thread IDs that were deleted with the project"},"assistants":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Assistants","description":"List of assistant IDs that were deleted with the project"}},"type":"object","required":["status","project_id"],"title":"ProjectDeleteResponse","description":"Response model for project deletion operations."},"ProjectSwitchResponse":{"properties":{"jwt_token":{"type":"string","title":"Jwt Token","description":"New JWT token with project context for API authentication","example":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMTIzIiwicHJvamVjdF9pZCI6IjQ1NiJ9.example"}},"type":"object","required":["jwt_token"],"title":"ProjectSwitchResponse","description":"Response model for project switching with JWT token."},"ProjectUpdateRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Updated project name","example":"Updated Project Name"},"description":{"type":"string","maxLength":500,"minLength":1,"title":"Description","description":"Updated project description","example":"Updated description of the project's purpose"}},"type":"object","required":["name","description"],"title":"ProjectUpdateRequest","description":"Request model for updating an existing project."},"PublicCreateRunPayload":{"properties":{"assistant_id":{"type":"string","title":"Assistant Id","description":"The assistant ID to run. Must be configured for public access."},"thread_id":{"type":"string","title":"Thread Id","description":"A stable thread/session identifier from the external platform (e.g., Typebot session ID). Used to maintain conversation state."},"input":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/AIMessage"},{"$ref":"#/components/schemas/HumanMessage"},{"$ref":"#/components/schemas/ChatMessage"},{"$ref":"#/components/schemas/SystemMessage"},{"$ref":"#/components/schemas/FunctionMessage"},{"$ref":"#/components/schemas/ToolMessage"},{"$ref":"#/components/schemas/AIMessageChunk"},{"$ref":"#/components/schemas/HumanMessageChunk"},{"$ref":"#/components/schemas/ChatMessageChunk"},{"$ref":"#/components/schemas/SystemMessageChunk"},{"$ref":"#/components/schemas/FunctionMessageChunk"},{"$ref":"#/components/schemas/ToolMessageChunk"}]},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input","description":"Messages or state to pass to the agent input."},"config":{"anyOf":[{"$ref":"#/components/schemas/RunnableConfig"},{"type":"null"}],"description":"Optional per-call configuration overrides."},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token","description":"Optional public access token when the assistant is configured with access_mode='public_token'. Can also be passed via the X-Public-Bot-Token header."}},"type":"object","required":["assistant_id","thread_id"],"title":"PublicCreateRunPayload","description":"Payload for creating a public run (no JWT required).\n\nThis endpoint is intended for embedding assistants in external platforms\nlike Typebot. Access is controlled via the assistant's configuration:\n\n- type==agent/access_mode: \"authenticated\" | \"public_token\" | \"public_no_auth\"\n- type==agent/public_token: \"<secret-token>\"  (when using public_token mode)"},"ResendVerificationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"User's email address","example":"user@example.com"}},"type":"object","required":["email"],"title":"ResendVerificationRequest","description":"Resend verification code request."},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token","description":"Password reset token from email","example":"abc123def456..."},"new_password":{"type":"string","minLength":8,"title":"New Password","description":"New password","example":"new-secure-password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest","description":"Reset password request payload."},"RunnableConfig":{"properties":{"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"callbacks":{"anyOf":[{"items":{},"type":"array"},{},{"type":"null"}],"title":"Callbacks"},"run_name":{"type":"string","title":"Run Name"},"max_concurrency":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Concurrency"},"recursion_limit":{"type":"integer","title":"Recursion Limit"},"configurable":{"additionalProperties":true,"type":"object","title":"Configurable"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"}},"type":"object","title":"RunnableConfig","description":"Configuration for a Runnable."},"SignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"User's email address for registration","example":"user@example.com"},"password":{"type":"string","minLength":8,"title":"Password","description":"User's password","example":"your-secure-password"}},"type":"object","required":["email","password"],"title":"SignupRequest","description":"Signup request payload with email and password."},"SignupResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Success message","example":"Verification email sent. Please check your inbox."},"email":{"type":"string","title":"Email","description":"Email address where verification was sent","example":"user@example.com"}},"type":"object","required":["message","email"],"title":"SignupResponse","description":"Signup response indicating verification email sent."},"SystemMessage":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"}],"title":"Content"},"additional_kwargs":{"additionalProperties":true,"type":"object","title":"Additional Kwargs"},"response_metadata":{"additionalProperties":true,"type":"object","title":"Response Metadata"},"type":{"type":"string","const":"system","title":"Type","default":"system"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"additionalProperties":true,"type":"object","required":["content"],"title":"SystemMessage","description":"Message for priming AI behavior.\n\nThe system message is usually passed in as the first of a sequence\nof input messages.\n\nExample:\n    ```python\n    from langchain_core.messages import HumanMessage, SystemMessage\n\n    messages = [\n        SystemMessage(content=\"You are a helpful assistant! Your name is Bob.\"),\n        HumanMessage(content=\"What is your name?\"),\n    ]\n\n    # Define a chat model and invoke it with the messages\n    print(model.invoke(messages))\n    ```"},"SystemMessageChunk":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"}],"title":"Content"},"additional_kwargs":{"additionalProperties":true,"type":"object","title":"Additional Kwargs"},"response_metadata":{"additionalProperties":true,"type":"object","title":"Response Metadata"},"type":{"type":"string","const":"SystemMessageChunk","title":"Type","default":"SystemMessageChunk"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"additionalProperties":true,"type":"object","required":["content"],"title":"SystemMessageChunk","description":"System Message chunk."},"TestEmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"TestEmailRequest"},"Thread":{"properties":{"thread_id":{"type":"string","title":"Thread Id"},"project_id":{"type":"string","title":"Project Id"},"assistant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Id"},"name":{"type":"string","title":"Name"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["thread_id","project_id","assistant_id","name","updated_at","metadata"],"title":"Thread"},"ThreadInfoResponse":{"properties":{"thread_counter":{"type":"integer","title":"Thread Counter","description":"Current number of threads used by the user","example":5},"thread_max":{"type":"integer","title":"Thread Max","description":"Maximum number of threads allowed for the user","example":100}},"type":"object","required":["thread_counter","thread_max"],"title":"ThreadInfoResponse","description":"Thread usage information response."},"ThreadListResponse":{"properties":{"threads":{"items":{"$ref":"#/components/schemas/Thread"},"type":"array","title":"Threads"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["threads","total","limit","offset"],"title":"ThreadListResponse","description":"Response model for paginated thread list."},"ThreadPostRequest":{"properties":{"values":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/AIMessage"},{"$ref":"#/components/schemas/HumanMessage"},{"$ref":"#/components/schemas/ChatMessage"},{"$ref":"#/components/schemas/SystemMessage"},{"$ref":"#/components/schemas/FunctionMessage"},{"$ref":"#/components/schemas/ToolMessage"},{"$ref":"#/components/schemas/AIMessageChunk"},{"$ref":"#/components/schemas/HumanMessageChunk"},{"$ref":"#/components/schemas/ChatMessageChunk"},{"$ref":"#/components/schemas/SystemMessageChunk"},{"$ref":"#/components/schemas/FunctionMessageChunk"},{"$ref":"#/components/schemas/ToolMessageChunk"}]},"type":"array"},{"additionalProperties":true,"type":"object"}],"title":"Values","description":"\n        Messages or state data to add to the thread. Can be:\n        - List of message objects (user messages, AI responses, system messages)\n        - Dictionary containing state updates or metadata\n        ","example":[{"content":"Hello, how can you help me today?","role":"user"},{"content":"I'm here to help! What would you like to know?","role":"assistant"}]},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","description":"Optional configuration overrides for this specific interaction","example":{"max_tokens":1000,"temperature":0.8}}},"type":"object","required":["values"],"title":"ThreadPostRequest","description":"Payload for adding messages or state to an existing conversation thread.\n\nThis is used to append new messages to the conversation history\nor update the thread's state."},"ThreadPutRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Human-readable name for the conversation thread (e.g., 'Project Planning', 'Bug Investigation')","example":"My Conversation"},"assistant_id":{"type":"string","title":"Assistant Id","description":"UUID of the AI assistant to use for this thread. The assistant defines the behavior and capabilities.","example":"123e4567-e89b-12d3-a456-426614174000"}},"type":"object","required":["name","assistant_id"],"title":"ThreadPutRequest","description":"Payload for creating or updating a conversation thread.\n\nThreads organize conversations with AI assistants and maintain context\nacross multiple interactions."},"ToolCall":{"properties":{"name":{"type":"string","title":"Name"},"args":{"additionalProperties":true,"type":"object","title":"Args"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"type":{"type":"string","const":"tool_call","title":"Type"}},"additionalProperties":true,"type":"object","required":["name","args","id"],"title":"ToolCall","description":"Represents an AI's request to call a tool.\n\nExample:\n    ```python\n    {\"name\": \"foo\", \"args\": {\"a\": 1}, \"id\": \"123\"}\n    ```\n\n    This represents a request to call the tool named `'foo'` with arguments\n    `{\"a\": 1}` and an identifier of `'123'`."},"ToolCallChunk":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"args":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Args"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Index"},"type":{"type":"string","const":"tool_call_chunk","title":"Type"}},"additionalProperties":true,"type":"object","required":["name","args","id","index"],"title":"ToolCallChunk","description":"A chunk of a tool call (yielded when streaming).\n\nWhen merging `ToolCallChunk`s (e.g., via `AIMessageChunk.__add__`),\nall string attributes are concatenated. Chunks are only merged if their\nvalues of `index` are equal and not None.\n\nExample:\n```python\nleft_chunks = [ToolCallChunk(name=\"foo\", args='{\"a\":', index=0)]\nright_chunks = [ToolCallChunk(name=None, args=\"1}\", index=0)]\n\n(\n    AIMessageChunk(content=\"\", tool_call_chunks=left_chunks)\n    + AIMessageChunk(content=\"\", tool_call_chunks=right_chunks)\n).tool_call_chunks == [ToolCallChunk(name=\"foo\", args='{\"a\":1}', index=0)]\n```"},"ToolListResponse":{"properties":{"tools":{"items":{"$ref":"#/components/schemas/ToolSchema"},"type":"array","title":"Tools"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["tools","total"],"title":"ToolListResponse","description":"Response model for tool list."},"ToolMessage":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"}],"title":"Content"},"additional_kwargs":{"additionalProperties":true,"type":"object","title":"Additional Kwargs"},"response_metadata":{"additionalProperties":true,"type":"object","title":"Response Metadata"},"type":{"type":"string","const":"tool","title":"Type","default":"tool"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"tool_call_id":{"type":"string","title":"Tool Call Id"},"artifact":{"title":"Artifact"},"status":{"type":"string","enum":["success","error"],"title":"Status","default":"success"}},"additionalProperties":true,"type":"object","required":["content","tool_call_id"],"title":"ToolMessage","description":"Message for passing the result of executing a tool back to a model.\n\n`ToolMessage` objects contain the result of a tool invocation. Typically, the result\nis encoded inside the `content` field.\n\nExample: A `ToolMessage` representing a result of `42` from a tool call with id\n\n```python\nfrom langchain_core.messages import ToolMessage\n\nToolMessage(content=\"42\", tool_call_id=\"call_Jja7J89XsjrOLA5r!MEOW!SL\")\n```\n\nExample: A `ToolMessage` where only part of the tool output is sent to the model\nand the full output is passed in to artifact.\n\n```python\nfrom langchain_core.messages import ToolMessage\n\ntool_output = {\n    \"stdout\": \"From the graph we can see that the correlation between \"\n    \"x and y is ...\",\n    \"stderr\": None,\n    \"artifacts\": {\"type\": \"image\", \"base64_data\": \"/9j/4gIcSU...\"},\n}\n\nToolMessage(\n    content=tool_output[\"stdout\"],\n    artifact=tool_output,\n    tool_call_id=\"call_Jja7J89XsjrOLA5r!MEOW!SL\",\n)\n```\n\nThe `tool_call_id` field is used to associate the tool call request with the\ntool call response. Useful in situations where a chat model is able\nto request multiple tool calls in parallel."},"ToolMessageChunk":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"}],"title":"Content"},"additional_kwargs":{"additionalProperties":true,"type":"object","title":"Additional Kwargs"},"response_metadata":{"additionalProperties":true,"type":"object","title":"Response Metadata"},"type":{"type":"string","const":"ToolMessageChunk","title":"Type","default":"ToolMessageChunk"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"tool_call_id":{"type":"string","title":"Tool Call Id"},"artifact":{"title":"Artifact"},"status":{"type":"string","enum":["success","error"],"title":"Status","default":"success"}},"additionalProperties":true,"type":"object","required":["content","tool_call_id"],"title":"ToolMessageChunk","description":"Tool Message chunk."},"ToolSchema":{"properties":{"name":{"type":"string","title":"Name","description":"Human-readable name of the tool"},"type":{"type":"string","title":"Type","description":"Unique type identifier for the tool"},"description":{"type":"string","title":"Description","description":"Description of what the tool does"},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Configuration schema for the tool"},"multi_use":{"type":"boolean","title":"Multi Use","description":"Whether this tool can be used multiple times in an assistant"}},"type":"object","required":["name","type","description","config","multi_use"],"title":"ToolSchema","description":"Tool schema definition."},"UpdateMaxThreadCounterRequest":{"properties":{"max_thread_counter":{"type":"integer","maximum":1000000.0,"minimum":0.0,"title":"Max Thread Counter","description":"New max_thread_counter value (0 to 1,000,000)"}},"type":"object","required":["max_thread_counter"],"title":"UpdateMaxThreadCounterRequest"},"UpdateMaxThreadCounterResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"thread_counter":{"type":"integer","title":"Thread Counter"},"max_thread_counter":{"type":"integer","title":"Max Thread Counter"},"message":{"type":"string","title":"Message"}},"type":"object","required":["user_id","email","thread_counter","max_thread_counter","message"],"title":"UpdateMaxThreadCounterResponse"},"UsageMetadata":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"},"input_token_details":{"$ref":"#/components/schemas/InputTokenDetails"},"output_token_details":{"$ref":"#/components/schemas/OutputTokenDetails"}},"additionalProperties":true,"type":"object","required":["input_tokens","output_tokens","total_tokens"],"title":"UsageMetadata","description":"Usage metadata for a message, such as token counts.\n\nThis is a standard representation of token usage that is consistent across models.\n\nExample:\n    ```python\n    {\n        \"input_tokens\": 350,\n        \"output_tokens\": 240,\n        \"total_tokens\": 590,\n        \"input_token_details\": {\n            \"audio\": 10,\n            \"cache_creation\": 200,\n            \"cache_read\": 100,\n        },\n        \"output_token_details\": {\n            \"audio\": 10,\n            \"reasoning\": 200,\n        },\n    }\n    ```\n\n!!! warning \"Behavior changed in `langchain-core` 0.3.9\"\n    Added `input_token_details` and `output_token_details`.\n\n!!! note \"LangSmith SDK\"\n    The LangSmith SDK also has a `UsageMetadata` class. While the two share fields,\n    LangSmith's `UsageMetadata` has additional fields to capture cost information\n    used by the LangSmith platform."},"UserCounterInfo":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"thread_counter":{"type":"integer","title":"Thread Counter"},"max_thread_counter":{"type":"integer","title":"Max Thread Counter"},"actual_thread_count":{"type":"integer","title":"Actual Thread Count","description":"Actual number of threads in database for this user"}},"type":"object","required":["user_id","email","thread_counter","max_thread_counter","actual_thread_count"],"title":"UserCounterInfo"},"UserDeletionSummary":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"deleted_projects":{"type":"integer","title":"Deleted Projects"},"deleted_threads":{"type":"integer","title":"Deleted Threads"},"deleted_assistants":{"type":"integer","title":"Deleted Assistants"},"success":{"type":"boolean","title":"Success"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["user_id","email","deleted_projects","deleted_threads","deleted_assistants","success"],"title":"UserDeletionSummary"},"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"},"VerifyEmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"User's email address","example":"user@example.com"},"code":{"type":"string","maxLength":6,"minLength":6,"title":"Code","description":"6-digit verification code","example":"123456"}},"type":"object","required":["email","code"],"title":"VerifyEmailRequest","description":"Email verification request payload."},"WebhookResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"WebhookResponse"}}}}