# ai_index_orgs_users_documents_train_sessions_create Description: Submit a document file in a chat session. Checks file type, size, and ensures the session exists, then processes the file. Process document for use in a specific chat session. which will be processed and made available for the AI to reference when responding to queries in that session. Methods: - POST: Submits a document or media file for training within a specified chat session. Parameters: - org (str): - session_id (str): UUID of the chat session for which the document is being submitted. - *kwargs: Additional arguments. - file (file): Multipart file input. Returns: - POST: Returns a JSON message with the result of the upload process. Response code 200 on success. { "message": "File processed." } Error Responses: - 400 Bad Request: - "File field is required" if the 'file' parameter is missing. - "invalid file object" if the file object is not valid. - Specific error message if an exception occurs while saving to Redis. - 404 Not Found: - "Session not found" if the provided session_id does not match any existing session. - 413 Request Entity Too Large: - "file is too large" including specific limits for document and media files if the file exceeds size limits. Access Control: Requires authentication with a Bearer token in the Authorization header. The user associated with the session must exist and be authorized for the request. Endpoint: POST /api/ai-index/orgs/{org}/users/{user_id}/documents/train/sessions/{session_id}/ Version: 3.59.0-ai-plus Security: PlatformApiKeyAuthentication ## Path parameters: - `org` (string, required) - `session_id` (string, required) - `user_id` (string, required) ## Request fields (multipart/form-data): - `file` (string, required) File to be trained ## Response 200 fields (application/json): - `message` (string, required) Message of the training