{ "openapi": "3.0.1", "info": { "title": "Web API", "description": "Public APIs for web applications including file uploads, chat interactions, and app management", "version": "1.0" }, "servers": [ { "url": "/api" } ], "security": [ { "Bearer": [] } ], "tags": [ { "name": "web", "description": "Web application API operations" } ], "paths": { "/audio-to-text": { "post": { "tags": [ "web" ], "summary": "Convert audio to text", "description": "Convert audio file to text using speech-to-text service.", "operationId": "Audio to Text", "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "413": { "description": "Audio file too large", "content": {} }, "415": { "description": "Unsupported audio type", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/chat-messages": { "post": { "tags": [ "web" ], "description": "Create a chat message for conversational applications.", "operationId": "Create Chat Message", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatMessagePayload" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "App Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } }, "x-codegen-request-body-name": "payload" } }, "/chat-messages/{task_id}/stop": { "post": { "tags": [ "web" ], "description": "Stop a running chat message task.", "operationId": "Stop Chat Message", "parameters": [ { "name": "task_id", "in": "path", "description": "Task ID to stop", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Task Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/completion-messages": { "post": { "tags": [ "web" ], "description": "Create a completion message for text generation applications.", "operationId": "Create Completion Message", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompletionMessagePayload" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "App Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } }, "x-codegen-request-body-name": "payload" } }, "/completion-messages/{task_id}/stop": { "post": { "tags": [ "web" ], "description": "Stop a running completion message task.", "operationId": "Stop Completion Message", "parameters": [ { "name": "task_id", "in": "path", "description": "Task ID to stop", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Task Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/conversations": { "get": { "tags": [ "web" ], "description": "Retrieve paginated list of conversations for a chat application.", "operationId": "Get Conversation List", "parameters": [ { "name": "last_id", "in": "query", "description": "Last conversation ID for pagination", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Number of conversations to return (1-100)", "schema": { "type": "integer", "default": 20 } }, { "name": "pinned", "in": "query", "description": "Filter by pinned status", "schema": { "type": "string", "enum": [ "true", "false" ] } }, { "name": "sort_by", "in": "query", "description": "Sort order", "schema": { "type": "string", "default": "-updated_at", "enum": [ "created_at", "-created_at", "updated_at", "-updated_at" ] } } ], "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "App Not Found or Not a Chat App", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/conversations/{c_id}": { "delete": { "tags": [ "web" ], "description": "Delete a specific conversation.", "operationId": "Delete Conversation", "parameters": [ { "name": "c_id", "in": "path", "description": "Conversation UUID", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Conversation deleted successfully", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Conversation Not Found or Not a Chat App", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/conversations/{c_id}/name": { "post": { "tags": [ "web" ], "description": "Rename a specific conversation with a custom name or auto-generate one.", "operationId": "Rename Conversation", "parameters": [ { "name": "c_id", "in": "path", "description": "Conversation UUID", "required": true, "schema": { "type": "string" } }, { "name": "name", "in": "query", "description": "New conversation name", "schema": { "type": "string" } }, { "name": "auto_generate", "in": "query", "description": "Auto-generate conversation name", "schema": { "type": "boolean", "default": false } } ], "responses": { "200": { "description": "Conversation renamed successfully", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Conversation Not Found or Not a Chat App", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/conversations/{c_id}/pin": { "patch": { "tags": [ "web" ], "description": "Pin a specific conversation to keep it at the top of the list.", "operationId": "Pin Conversation", "parameters": [ { "name": "c_id", "in": "path", "description": "Conversation UUID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Conversation pinned successfully", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Conversation Not Found or Not a Chat App", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/conversations/{c_id}/unpin": { "patch": { "tags": [ "web" ], "description": "Unpin a specific conversation to remove it from the top of the list.", "operationId": "Unpin Conversation", "parameters": [ { "name": "c_id", "in": "path", "description": "Conversation UUID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Conversation unpinned successfully", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Conversation Not Found or Not a Chat App", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/email-code-login": { "post": { "tags": [ "web" ], "description": "Send email verification code for login", "operationId": "send_email_code_login", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailCodeLoginSendPayload" } } }, "required": true }, "responses": { "200": { "description": "Email code sent successfully", "content": {} }, "400": { "description": "Bad request - invalid email format", "content": {} }, "404": { "description": "Account not found", "content": {} } }, "x-codegen-request-body-name": "payload" } }, "/email-code-login/validity": { "post": { "tags": [ "web" ], "description": "Verify email code and complete login", "operationId": "verify_email_code_login", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailCodeLoginVerifyPayload" } } }, "required": true }, "responses": { "200": { "description": "Email code verified and login successful", "content": {} }, "400": { "description": "Bad request - invalid code or token", "content": {} }, "401": { "description": "Invalid token or expired code", "content": {} }, "404": { "description": "Account not found", "content": {} } }, "x-codegen-request-body-name": "payload" } }, "/files/upload": { "post": { "tags": [ "web" ], "summary": "Upload a file for use in web applications", "description": "Upload a file for use in web applications\nAccepts file uploads for use within web applications, supporting\nmultiple file types with automatic validation and storage.\n\nArgs:\n app_model: The associated application model\n end_user: The end user uploading the file\n\nForm Parameters:\n file: The file to upload (required)\n source: Optional source type (datasets or None)\n\nReturns:\n dict: File information including ID, URL, and metadata\n int: HTTP status code 201 for success\n\nRaises:\n NoFileUploadedError: No file provided in request\n TooManyFilesError: Multiple files provided (only one allowed)\n FilenameNotExistsError: File has no filename\n FileTooLargeError: File exceeds size limit\n UnsupportedFileTypeError: File type not supported", "operationId": "upload_file", "responses": { "201": { "description": "File uploaded successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileResponse" } } } }, "400": { "description": "Bad request - invalid file or parameters", "content": {} }, "413": { "description": "File too large", "content": {} }, "415": { "description": "Unsupported file type", "content": {} } } } }, "/forgot-password": { "post": { "tags": [ "web" ], "description": "Send password reset email", "operationId": "send_forgot_password_email", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForgotPasswordSendPayload" } } }, "required": true }, "responses": { "200": { "description": "Password reset email sent successfully", "content": {} }, "400": { "description": "Bad request - invalid email format", "content": {} }, "404": { "description": "Account not found", "content": {} }, "429": { "description": "Too many requests - rate limit exceeded", "content": {} } }, "x-codegen-request-body-name": "payload" } }, "/forgot-password/resets": { "post": { "tags": [ "web" ], "description": "Reset user password with verification token", "operationId": "reset_password", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForgotPasswordResetPayload" } } }, "required": true }, "responses": { "200": { "description": "Password reset successfully", "content": {} }, "400": { "description": "Bad request - invalid parameters or password mismatch", "content": {} }, "401": { "description": "Invalid or expired token", "content": {} }, "404": { "description": "Account not found", "content": {} } }, "x-codegen-request-body-name": "payload" } }, "/forgot-password/validity": { "post": { "tags": [ "web" ], "description": "Verify password reset token validity", "operationId": "check_forgot_password_token", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForgotPasswordCheckPayload" } } }, "required": true }, "responses": { "200": { "description": "Token is valid", "content": {} }, "400": { "description": "Bad request - invalid token format", "content": {} }, "401": { "description": "Invalid or expired token", "content": {} } }, "x-codegen-request-body-name": "payload" } }, "/login": { "post": { "tags": [ "web" ], "summary": "Authenticate user and login", "description": "Authenticate user for web application access", "operationId": "web_app_login", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginPayload" } } }, "required": true }, "responses": { "200": { "description": "Authentication successful", "content": {} }, "400": { "description": "Bad request - invalid email or password format", "content": {} }, "401": { "description": "Authentication failed - email or password mismatch", "content": {} }, "403": { "description": "Account banned or login disabled", "content": {} }, "404": { "description": "Account not found", "content": {} } }, "x-codegen-request-body-name": "payload" } }, "/login/status": { "get": { "tags": [ "web" ], "description": "Check login status", "operationId": "web_app_login_status", "responses": { "200": { "description": "Login status", "content": {} }, "401": { "description": "Login status", "content": {} } } } }, "/logout": { "post": { "tags": [ "web" ], "description": "Logout user from web application", "operationId": "web_app_logout", "responses": { "200": { "description": "Logout successful", "content": {} } } } }, "/messages": { "get": { "tags": [ "web" ], "description": "Retrieve paginated list of messages from a conversation in a chat application.", "operationId": "Get Message List", "parameters": [ { "name": "conversation_id", "in": "query", "description": "Conversation UUID", "required": true, "schema": { "type": "string" } }, { "name": "first_id", "in": "query", "description": "First message ID for pagination", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Number of messages to return (1-100)", "schema": { "type": "integer", "default": 20 } } ], "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Conversation Not Found or Not a Chat App", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/messages/{message_id}/feedbacks": { "post": { "tags": [ "web" ], "description": "Submit feedback (like/dislike) for a specific message.", "operationId": "Create Message Feedback", "parameters": [ { "name": "message_id", "in": "path", "description": "Message UUID", "required": true, "schema": { "type": "string" } }, { "name": "rating", "in": "query", "description": "Feedback rating", "schema": { "type": "string", "enum": [ "like", "dislike" ] } }, { "name": "content", "in": "query", "description": "Feedback content", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Feedback submitted successfully", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Message Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/messages/{message_id}/more-like-this": { "get": { "tags": [ "web" ], "description": "Generate a new completion similar to an existing message (completion apps only).", "operationId": "Generate More Like This", "parameters": [ { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageMoreLikeThisQuery" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request - Not a completion app or feature disabled", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Message Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } }, "x-codegen-request-body-name": "payload" } }, "/messages/{message_id}/suggested-questions": { "get": { "tags": [ "web" ], "description": "Get suggested follow-up questions after a message (chat apps only).", "operationId": "Get Suggested Questions", "parameters": [ { "name": "message_id", "in": "path", "description": "Message UUID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request - Not a chat app or feature disabled", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Message Not Found or Conversation Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/meta": { "get": { "tags": [ "web" ], "summary": "Get app meta", "description": "Retrieve the metadata for a specific app.", "operationId": "Get App Meta", "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "App Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/parameters": { "get": { "tags": [ "web" ], "summary": "Retrieve app parameters", "description": "Retrieve the parameters for a specific app.", "operationId": "Get App Parameters", "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "App Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/passport": { "get": { "tags": [ "web" ], "description": "Get authentication passport for web application access", "operationId": "get_passport", "responses": { "200": { "description": "Passport retrieved successfully", "content": {} }, "401": { "description": "Unauthorized - missing app code or invalid authentication", "content": {} }, "404": { "description": "Application or user not found", "content": {} } } } }, "/remote-files/upload": { "post": { "tags": [ "web" ], "summary": "Upload a file from a remote URL", "description": "Upload a file from a remote URL\nDownloads a file from the provided remote URL and uploads it\nto the platform storage for use in web applications.\n\nArgs:\n app_model: The associated application model\n end_user: The end user making the request\n\nJSON Parameters:\n url: The remote URL to download the file from (required)\n\nReturns:\n dict: File information including ID, signed URL, and metadata\n int: HTTP status code 201 for success\n\nRaises:\n RemoteFileUploadError: Failed to fetch file from remote URL\n FileTooLargeError: File exceeds size limit\n UnsupportedFileTypeError: File type not supported", "operationId": "upload_remote_file", "responses": { "201": { "description": "Remote file uploaded successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileWithSignedUrl" } } } }, "400": { "description": "Bad request - invalid URL or parameters", "content": {} }, "413": { "description": "File too large", "content": {} }, "415": { "description": "Unsupported file type", "content": {} }, "500": { "description": "Failed to fetch remote file", "content": {} } } } }, "/remote-files/{url}": { "get": { "tags": [ "web" ], "summary": "Get information about a remote file", "description": "Get information about a remote file\nRetrieves basic information about a file located at a remote URL,\nincluding content type and content length.\n\nArgs:\n app_model: The associated application model\n end_user: The end user making the request\n url: URL-encoded path to the remote file\n\nReturns:\n dict: Remote file information including type and length\n\nRaises:\n HTTPException: If the remote file cannot be accessed", "operationId": "get_remote_file_info", "parameters": [ { "name": "url", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Remote file information retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RemoteFileInfo" } } } }, "400": { "description": "Bad request - invalid URL", "content": {} }, "404": { "description": "Remote file not found", "content": {} }, "500": { "description": "Failed to fetch remote file", "content": {} } } } }, "/saved-messages": { "get": { "tags": [ "web" ], "description": "Retrieve paginated list of saved messages for a completion application.", "operationId": "Get Saved Messages", "parameters": [ { "name": "last_id", "in": "query", "description": "Last message ID for pagination", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Number of messages to return (1-100)", "schema": { "type": "integer", "default": 20 } } ], "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request - Not a completion app", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "App Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "web" ], "description": "Save a specific message for later reference.", "operationId": "Save Message", "parameters": [ { "name": "message_id", "in": "query", "description": "Message UUID to save", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Message saved successfully", "content": {} }, "400": { "description": "Bad Request - Not a completion app", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Message Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/saved-messages/{message_id}": { "delete": { "tags": [ "web" ], "description": "Remove a message from saved messages.", "operationId": "Delete Saved Message", "parameters": [ { "name": "message_id", "in": "path", "description": "Message UUID to delete", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Message removed successfully", "content": {} }, "400": { "description": "Bad Request - Not a completion app", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Message Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/site": { "get": { "tags": [ "web" ], "summary": "Retrieve app site info", "description": "Retrieve app site information and configuration.", "operationId": "Get App Site Info", "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "App Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/system-features": { "get": { "tags": [ "web" ], "summary": "Get system feature flags and configuration", "description": "Get system feature flags and configuration\nReturns the current system feature flags and configuration\nthat control various functionalities across the platform.\n\nReturns:\n dict: System feature configuration object\n\nThis endpoint is akin to the `SystemFeatureApi` endpoint in api/controllers/console/feature.py,\nexcept it is intended for use by the web app, instead of the console dashboard.\n\nNOTE: This endpoint is unauthenticated by design, as it provides system features\ndata required for webapp initialization.\n\nAuthentication would create circular dependency (can't authenticate without webapp loading).\n\nOnly non-sensitive configuration data should be returned by this endpoint.", "operationId": "get_system_features", "responses": { "200": { "description": "System features retrieved successfully", "content": {} }, "500": { "description": "Internal server error", "content": {} } } } }, "/text-to-audio": { "post": { "tags": [ "web" ], "summary": "Convert text to audio", "description": "Convert text to audio using text-to-speech service.", "operationId": "Text to Audio", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TextToAudioPayload" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } }, "x-codegen-request-body-name": "payload" } }, "/webapp/access-mode": { "get": { "tags": [ "web" ], "description": "Retrieve the access mode for a web application (public or restricted).", "operationId": "Get App Access Mode", "parameters": [ { "name": "appId", "in": "query", "description": "Application ID", "schema": { "type": "string" } }, { "name": "appCode", "in": "query", "description": "Application code", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/webapp/permission": { "get": { "tags": [ "web" ], "description": "Check if user has permission to access a web application.", "operationId": "Check App Permission", "parameters": [ { "name": "appId", "in": "query", "description": "Application ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } }, "/workflows/run": { "post": { "tags": [ "web" ], "summary": "Run workflow", "description": "Execute a workflow with provided inputs and files.", "operationId": "Run Workflow", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowRunPayload" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "App Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } }, "x-codegen-request-body-name": "payload" } }, "/workflows/tasks/{task_id}/stop": { "post": { "tags": [ "web" ], "summary": "Stop workflow task", "description": "Stop a running workflow task.", "operationId": "Stop Workflow Task", "parameters": [ { "name": "task_id", "in": "path", "description": "Task ID to stop", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Task Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } } } }, "components": { "schemas": { "TextToAudioPayload": { "title": "TextToAudioPayload", "type": "object", "properties": { "message_id": { "title": "Message Id", "type": "object" }, "voice": { "title": "Voice", "type": "object" }, "text": { "title": "Text", "type": "object" }, "streaming": { "title": "Streaming", "type": "object" } } }, "CompletionMessagePayload": { "title": "CompletionMessagePayload", "required": [ "inputs" ], "type": "object", "properties": { "inputs": { "title": "Inputs", "type": "object", "additionalProperties": true, "description": "Input variables for the completion" }, "query": { "title": "Query", "type": "string", "description": "Query text for completion", "default": "" }, "files": { "title": "Files", "type": "object", "description": "Files to be processed" }, "response_mode": { "title": "Response Mode", "type": "object", "description": "Response mode: blocking or streaming" }, "retriever_from": { "title": "Retriever From", "type": "string", "description": "Source of retriever", "default": "web_app" } } }, "ChatMessagePayload": { "title": "ChatMessagePayload", "required": [ "inputs", "query" ], "type": "object", "properties": { "inputs": { "title": "Inputs", "type": "object", "additionalProperties": true, "description": "Input variables for the chat" }, "query": { "title": "Query", "type": "string", "description": "User query/message" }, "files": { "title": "Files", "type": "object", "description": "Files to be processed" }, "response_mode": { "title": "Response Mode", "type": "object", "description": "Response mode: blocking or streaming" }, "conversation_id": { "title": "Conversation Id", "type": "object", "description": "Conversation ID" }, "parent_message_id": { "title": "Parent Message Id", "type": "object", "description": "Parent message ID" }, "retriever_from": { "title": "Retriever From", "type": "string", "description": "Source of retriever", "default": "web_app" } } }, "FileResponse": { "title": "FileResponse", "required": [ "id", "name", "size" ], "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "size": { "title": "Size", "type": "integer" }, "extension": { "title": "Extension", "type": "object" }, "mime_type": { "title": "Mime Type", "type": "object" }, "created_by": { "title": "Created By", "type": "object" }, "created_at": { "title": "Created At", "type": "object" }, "preview_url": { "title": "Preview Url", "type": "object" }, "source_url": { "title": "Source Url", "type": "object" }, "original_url": { "title": "Original Url", "type": "object" }, "user_id": { "title": "User Id", "type": "object" }, "tenant_id": { "title": "Tenant Id", "type": "object" }, "conversation_id": { "title": "Conversation Id", "type": "object" }, "file_key": { "title": "File Key", "type": "object" } } }, "ForgotPasswordSendPayload": { "title": "ForgotPasswordSendPayload", "required": [ "email" ], "type": "object", "properties": { "email": { "title": "Email", "type": "string" }, "language": { "title": "Language", "type": "object" } } }, "ForgotPasswordCheckPayload": { "title": "ForgotPasswordCheckPayload", "required": [ "code", "email", "token" ], "type": "object", "properties": { "email": { "title": "Email", "type": "string" }, "code": { "title": "Code", "type": "string" }, "token": { "title": "Token", "minLength": 1, "type": "string" } } }, "ForgotPasswordResetPayload": { "title": "ForgotPasswordResetPayload", "required": [ "new_password", "password_confirm", "token" ], "type": "object", "properties": { "token": { "title": "Token", "minLength": 1, "type": "string" }, "new_password": { "title": "New Password", "type": "string" }, "password_confirm": { "title": "Password Confirm", "type": "string" } } }, "LoginPayload": { "title": "LoginPayload", "required": [ "email", "password" ], "type": "object", "properties": { "email": { "title": "Email", "type": "string" }, "password": { "title": "Password", "type": "string" } } }, "EmailCodeLoginSendPayload": { "title": "EmailCodeLoginSendPayload", "required": [ "email" ], "type": "object", "properties": { "email": { "title": "Email", "type": "string" }, "language": { "title": "Language", "type": "object" } } }, "EmailCodeLoginVerifyPayload": { "title": "EmailCodeLoginVerifyPayload", "required": [ "code", "email", "token" ], "type": "object", "properties": { "email": { "title": "Email", "type": "string" }, "code": { "title": "Code", "type": "string" }, "token": { "title": "Token", "minLength": 1, "type": "string" } } }, "MessageMoreLikeThisQuery": { "title": "MessageMoreLikeThisQuery", "required": [ "response_mode" ], "type": "object", "properties": { "response_mode": { "title": "Response Mode", "type": "string", "description": "Response mode", "enum": [ "blocking", "streaming" ] } } }, "RemoteFileInfo": { "title": "RemoteFileInfo", "required": [ "file_length", "file_type" ], "type": "object", "properties": { "file_type": { "title": "File Type", "type": "string" }, "file_length": { "title": "File Length", "type": "integer" } } }, "FileWithSignedUrl": { "title": "FileWithSignedUrl", "required": [ "id", "name", "size" ], "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "size": { "title": "Size", "type": "integer" }, "extension": { "title": "Extension", "type": "object" }, "url": { "title": "Url", "type": "object" }, "mime_type": { "title": "Mime Type", "type": "object" }, "created_by": { "title": "Created By", "type": "object" }, "created_at": { "title": "Created At", "type": "object" } } }, "WorkflowRunPayload": { "title": "WorkflowRunPayload", "required": [ "inputs" ], "type": "object", "properties": { "inputs": { "title": "Inputs", "type": "object", "additionalProperties": true, "description": "Input variables for the workflow" }, "files": { "title": "Files", "type": "object", "description": "Files to be processed by the workflow" } } }, "AppAccessModeQuery": { "title": "AppAccessModeQuery", "type": "object", "properties": { "appId": { "title": "Appid", "type": "object", "description": "Application ID" }, "appCode": { "title": "Appcode", "type": "object", "description": "Application code" } } }, "ConversationListQuery": { "title": "ConversationListQuery", "type": "object", "properties": { "last_id": { "title": "Last Id", "type": "object" }, "limit": { "title": "Limit", "maximum": 100, "minimum": 1, "type": "integer" }, "pinned": { "title": "Pinned", "type": "object" }, "sort_by": { "title": "Sort By", "type": "string", "default": "-updated_at", "enum": [ "created_at", "-created_at", "updated_at", "-updated_at" ] } } }, "ConversationRenamePayload": { "title": "ConversationRenamePayload", "type": "object", "properties": { "name": { "title": "Name", "type": "object" }, "auto_generate": { "title": "Auto Generate", "type": "boolean", "default": false } } }, "MessageListQuery": { "title": "MessageListQuery", "required": [ "conversation_id" ], "type": "object", "properties": { "conversation_id": { "title": "Conversation Id", "type": "string", "description": "Conversation UUID" }, "first_id": { "title": "First Id", "type": "object", "description": "First message ID for pagination" }, "limit": { "title": "Limit", "maximum": 100, "minimum": 1, "type": "integer", "description": "Number of messages to return (1-100)" } } }, "MessageFeedbackPayload": { "title": "MessageFeedbackPayload", "type": "object", "properties": { "rating": { "title": "Rating", "type": "object", "description": "Feedback rating" }, "content": { "title": "Content", "type": "object", "description": "Feedback content" } } }, "RemoteFileUploadPayload": { "title": "RemoteFileUploadPayload", "required": [ "url" ], "type": "object", "properties": { "url": { "title": "Url", "maxLength": 2083, "minLength": 1, "type": "string", "description": "Remote file URL", "format": "uri" } } }, "SavedMessageListQuery": { "title": "SavedMessageListQuery", "type": "object", "properties": { "last_id": { "title": "Last Id", "type": "object" }, "limit": { "title": "Limit", "maximum": 100, "minimum": 1, "type": "integer" } } }, "SavedMessageCreatePayload": { "title": "SavedMessageCreatePayload", "required": [ "message_id" ], "type": "object", "properties": { "message_id": { "title": "Message Id", "type": "string" } } } }, "responses": { "ParseError": { "description": "When a mask can't be parsed", "content": {} }, "MaskError": { "description": "When any error occurs on mask", "content": {} }, "HTTPException": { "content": {} }, "ValueError": { "content": {} }, "AppInvokeQuotaExceededError": { "content": {} }, "Exception": { "content": {} } }, "securitySchemes": { "Bearer": { "type": "apiKey", "description": "Type: Bearer {your-api-key}", "name": "Authorization", "in": "header" } } }, "x-original-swagger-version": "2.0" }