{ "openapi": "3.1.0", "info": { "title": "AIP Platform - Enterprise Control Plane", "description": "Enterprise Multi-tenant AI Gateway & Inference Middleware Platform", "version": "1.0.0" }, "paths": { "/": { "get": { "tags": [ "Root" ], "summary": "Control Plane Overview", "operationId": "root__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/chat/completions": { "post": { "tags": [ "Chat Completions" ], "summary": "Create Chat Completion (OpenAI-compatible, SSE Streaming Supported)", "operationId": "create_chat_completion_v1_chat_completions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatCompletionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/completions": { "post": { "tags": [ "Completions" ], "summary": "Create Completion", "operationId": "create_completion_v1_completions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompletionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/embeddings": { "post": { "tags": [ "Embeddings" ], "summary": "Vector Embeddings Extraction", "operationId": "create_embeddings_v1_embeddings_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmbeddingRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmbeddingResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/audio/transcriptions": { "post": { "tags": [ "Audio (STT & TTS)" ], "summary": "Speech to Text (ASR Transcription)", "operationId": "create_transcription_v1_audio_transcriptions_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_create_transcription_v1_audio_transcriptions_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/audio/speech": { "get": { "tags": [ "Audio (STT & TTS)" ], "summary": "Quick Browser Audio Synthesis (GET)", "operationId": "create_speech_browser_v1_audio_speech_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "input", "in": "query", "required": false, "schema": { "type": "string", "default": "Xin chào, đây là hệ thống chuyển đổi văn bản thành giọng nói.", "title": "Input" } }, { "name": "voice", "in": "query", "required": false, "schema": { "type": "string", "default": "northern_female", "title": "Voice" } }, { "name": "response_format", "in": "query", "required": false, "schema": { "type": "string", "default": "mp3", "title": "Response Format" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Audio (STT & TTS)" ], "summary": "Text to Speech (Audio Synthesis)", "operationId": "create_speech_v1_audio_speech_post", "security": [ { "HTTPBearer": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeechRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/images/generations": { "post": { "tags": [ "Image Generations" ], "summary": "Text to Image Generation (Timeout: 60s)", "operationId": "generate_images_v1_images_generations_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageGenerationRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageGenerationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/images/edits": { "post": { "tags": [ "Image Generations" ], "summary": "Image Inpainting & Edits (Timeout: 60s)", "operationId": "edit_images_v1_images_edits_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_edit_images_v1_images_edits_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageGenerationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/moderations": { "post": { "tags": [ "Moderations" ], "summary": "Content Safety & Policy Moderation (AI-Powered Multimodal, Timeout: 30s)", "operationId": "create_moderation_v1_moderations_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModerationRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/models": { "get": { "tags": [ "Models & Aliases" ], "summary": "List Available Model Aliases (Scoped to API Key)", "description": "Returns list of active AI model aliases accessible by the client's API Key.", "operationId": "list_models_v1_models_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/models/status": { "get": { "tags": [ "Status & Health Probes" ], "summary": "Status of Models Hosted on vLLM Engine (OpenAI-compatible alias)", "operationId": "models_status_alias_v1_models_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/models/{alias}": { "get": { "tags": [ "Models & Aliases" ], "summary": "Retrieve Model Alias Metadata & Specs", "description": "Retrieves granular specs, min VRAM, runtime engine, and status for a specific alias.", "operationId": "get_model_alias_v1_models__alias__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "alias", "in": "path", "required": true, "schema": { "type": "string", "title": "Alias" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/ocr/process": { "post": { "tags": [ "Document OCR & Intelligent Document Processing" ], "summary": "General Document OCR (PaddleOCR-VL)", "operationId": "ocr_process_document_v1_ocr_process_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_ocr_process_document_v1_ocr_process_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/ocr": { "post": { "tags": [ "Document OCR & Intelligent Document Processing" ], "summary": "General Document OCR (PaddleOCR-VL)", "operationId": "ocr_process_document_v1_ocr_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_ocr_process_document_v1_ocr_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/ocr/driver-license": { "post": { "tags": [ "Document OCR & Intelligent Document Processing" ], "summary": "Driver License OCR Extraction", "operationId": "ocr_driver_license_v1_ocr_driver_license_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_ocr_driver_license_v1_ocr_driver_license_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/ocr/id-card": { "post": { "tags": [ "Document OCR & Intelligent Document Processing" ], "summary": "National ID (CCCD/CMND) OCR Extraction", "description": "Extract structured identity information from Vietnamese ID cards (CCCD/CMND).\nSupports single-side (front/back) or 2-sided recognition simultaneously.", "operationId": "ocr_id_card_v1_ocr_id_card_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_ocr_id_card_v1_ocr_id_card_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/ocr/passport": { "post": { "tags": [ "Document OCR & Intelligent Document Processing" ], "summary": "Passport OCR Extraction", "operationId": "ocr_passport_v1_ocr_passport_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_ocr_passport_v1_ocr_passport_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/vision/facematch": { "post": { "tags": [ "Computer Vision & Biometric eKYC" ], "summary": "Biometric Face Match (1:1 Verification)", "operationId": "vision_facematch_v1_vision_facematch_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_vision_facematch_v1_vision_facematch_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FaceMatchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/vision/liveness": { "post": { "tags": [ "Computer Vision & Biometric eKYC" ], "summary": "Anti-spoofing Liveness Detection", "operationId": "vision_liveness_v1_vision_liveness_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_vision_liveness_v1_vision_liveness_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LivenessResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/nlp/translation": { "post": { "tags": [ "Natural Language Processing (Translation & Summarization)" ], "summary": "Bilingual Text Translation (Helsinki-NLP / Opus-MT)", "operationId": "nlp_translation_v1_nlp_translation_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranslationRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranslationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/nlp/summarization": { "post": { "tags": [ "Natural Language Processing (Translation & Summarization)" ], "summary": "Intelligent Text Summarization", "operationId": "nlp_summarization_v1_nlp_summarization_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SummarizationRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/jobs": { "post": { "tags": [ "Async Jobs" ], "summary": "Create Async Job", "operationId": "create_async_job_v1_jobs_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "idempotency-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Idempotency-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobCreateRequest" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobStatusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/jobs/{job_id}": { "get": { "tags": [ "Async Jobs" ], "summary": "Get Job Status", "operationId": "get_job_status_v1_jobs__job_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobStatusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/jobs/{job_id}/result": { "get": { "tags": [ "Async Jobs" ], "summary": "Get Job Result", "description": "SRS Section 3.3: Client retrieves result via pre-signed URL with default 24h TTL.", "operationId": "get_job_result_v1_jobs__job_id__result_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/jobs/{job_id}/cancel": { "post": { "tags": [ "Async Jobs" ], "summary": "Cancel Job", "operationId": "cancel_job_v1_jobs__job_id__cancel_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/predictions": { "post": { "tags": [ "Predictions (Custom Inference)" ], "summary": "Execute Custom Model Prediction (Timeout: 120s)", "operationId": "create_prediction_v1_predictions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PredictionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/predictions/{alias}": { "post": { "tags": [ "Predictions (Custom Inference)" ], "summary": "Execute Custom Model Prediction by URL alias (Timeout: 120s)", "operationId": "create_prediction_by_alias_v1_predictions__alias__post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "alias", "in": "path", "required": true, "schema": { "type": "string", "title": "Alias" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Payload" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mcp/sse": { "get": { "tags": [ "Model Context Protocol (MCP) Gateway Bridge" ], "summary": "MCP Server-Sent Events (SSE) Stream", "description": "Establishes SSE Connection for MCP Clients (Cursor, Antigravity, Claude Desktop).", "operationId": "mcp_sse_stream_v1_mcp_sse_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/mcp/messages": { "post": { "tags": [ "Model Context Protocol (MCP) Gateway Bridge" ], "summary": "MCP JSON-RPC Tool Execution Message Endpoint", "description": "Receives MCP JSON-RPC 2.0 requests from MCP Clients and executes AIP Model tools.", "operationId": "mcp_messages_v1_mcp_messages_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/mcp/tools": { "get": { "tags": [ "Model Context Protocol (MCP) Gateway Bridge" ], "summary": "List Available MCP Tools", "description": "Returns the list of exposed AIP Model tools for MCP protocol.", "operationId": "list_mcp_tools_v1_mcp_tools_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/auth/signup": { "post": { "tags": [ "Authentication & Staff Accounts" ], "summary": "Register Staff / Admin Account", "operationId": "signup_v1_auth_signup_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignupRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/auth/login": { "post": { "tags": [ "Authentication & Staff Accounts" ], "summary": "Login Staff / Admin Account", "operationId": "login_v1_auth_login_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/auth/forgot-password": { "post": { "tags": [ "Authentication & Staff Accounts" ], "summary": "Reset Account Password", "operationId": "forgot_password_v1_auth_forgot_password_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForgotPasswordRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/user/projects": { "get": { "tags": [ "User Portal & Console API" ], "summary": "List User Projects", "description": "Fetch user projects from MongoDB Atlas.", "operationId": "list_user_projects_v1_user_projects_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Response List User Projects V1 User Projects Get" } } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "User Portal & Console API" ], "summary": "Create User Project", "description": "Create a new project in MongoDB Atlas.", "operationId": "create_user_project_v1_user_projects_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectCreateRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/user/api-keys": { "get": { "tags": [ "User Portal & Console API" ], "summary": "List User Api Keys", "description": "Fetch active API keys from MongoDB Atlas.", "operationId": "list_user_api_keys_v1_user_api_keys_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Response List User Api Keys V1 User Api Keys Get" } } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "User Portal & Console API" ], "summary": "Create User Api Key", "description": "Generate and store a new API Key in MongoDB Atlas.", "operationId": "create_user_api_key_v1_user_api_keys_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyCreateRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/user/api-keys/{key_id}": { "delete": { "tags": [ "User Portal & Console API" ], "summary": "Delete User Api Key", "description": "Revoke an API key in MongoDB Atlas.", "operationId": "delete_user_api_key_v1_user_api_keys__key_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/user/payments": { "get": { "tags": [ "User Portal & Console API" ], "summary": "List User Payments", "description": "Fetch payment history transactions directly from MongoDB Atlas payments collection.", "operationId": "list_user_payments_v1_user_payments_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Response List User Payments V1 User Payments Get" } } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "User Portal & Console API" ], "summary": "Record User Payment", "description": "Record a completed VNPAY payment transaction in MongoDB Atlas.", "operationId": "record_user_payment_v1_user_payments_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentCreateRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/user/apis": { "get": { "tags": [ "User Portal & Console API" ], "summary": "Get User Apis State", "description": "Get active API states for user from MongoDB Atlas api_subscriptions collection.", "operationId": "get_user_apis_state_v1_user_apis_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "User Portal & Console API" ], "summary": "Update User Apis State", "description": "Update active API states for user in MongoDB Atlas api_subscriptions collection.", "operationId": "update_user_apis_state_v1_user_apis_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApisStateUpdateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/user/apis-state": { "get": { "tags": [ "User Portal & Console API" ], "summary": "Get User Apis State", "description": "Get active API states for user from MongoDB Atlas api_subscriptions collection.", "operationId": "get_user_apis_state_v1_user_apis_state_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "User Portal & Console API" ], "summary": "Update User Apis State", "description": "Update active API states for user in MongoDB Atlas api_subscriptions collection.", "operationId": "update_user_apis_state_v1_user_apis_state_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApisStateUpdateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/user/balance": { "get": { "tags": [ "User Portal & Console API" ], "summary": "Get User Balance", "description": "Get paid balance from MongoDB Atlas api_subscriptions collection.", "operationId": "get_user_balance_v1_user_balance_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/user/recharge": { "post": { "tags": [ "User Portal & Console API" ], "summary": "Recharge User Balance", "description": "Recharge credits and record payment in MongoDB Atlas.", "operationId": "recharge_user_balance_v1_user_recharge_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RechargeBalanceRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/user/feedback": { "post": { "tags": [ "User Portal & Console API" ], "summary": "Submit User Feedback", "description": "Save user feedback into MongoDB Atlas notifications collection.", "operationId": "submit_user_feedback_v1_user_feedback_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__api__user_portal__FeedbackRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/user/contact": { "post": { "tags": [ "User Portal & Console API" ], "summary": "Submit User Contact", "description": "Save user contact inquiry into MongoDB Atlas notifications collection.", "operationId": "submit_user_contact_v1_user_contact_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactMessageRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/user/apis-catalog": { "get": { "tags": [ "User Portal & Console API" ], "summary": "List Database Apis Catalog", "description": "Fetch all available API services catalog from MongoDB Atlas endpoints.", "operationId": "list_database_apis_catalog_v1_user_apis_catalog_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Response List Database Apis Catalog V1 User Apis Catalog Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/user/catalog": { "get": { "tags": [ "User Portal & Console API" ], "summary": "List Database Apis Catalog", "description": "Fetch all available API services catalog from MongoDB Atlas endpoints.", "operationId": "list_database_apis_catalog_v1_user_catalog_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Response List Database Apis Catalog V1 User Catalog Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/user/gpu-status": { "get": { "tags": [ "User Portal & Console API" ], "summary": "Get User Gpu Status", "description": "Get GPU VRAM and node resource utilization status for staff portal.", "operationId": "get_user_gpu_status_v1_user_gpu_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/user/api-summary": { "get": { "tags": [ "User Portal & Console API" ], "summary": "Get API usage counts from MongoDB", "description": "Aggregate request and error counts for API endpoints in the database catalog.", "operationId": "get_user_api_usage_summary_v1_user_api_summary_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/user/api-report": { "get": { "tags": [ "User Portal & Console API" ], "summary": "List API Call Logs with Filtering (Staff Report)", "description": "Fetch API call execution logs from MongoDB with optional filters.\nUsed by the Staff API Report page.\n\n- **status**: Filter by HTTP status code group: \"200\", \"400\", \"500\"\n- **api**: Filter by API path keyword (e.g. \"speech\", \"completions\")\n- **from_date**: Start date (YYYY/MM/DD or YYYY-MM-DD)\n- **to_date**: End date (YYYY/MM/DD or YYYY-MM-DD)\n- **page**: Page number (default 1)\n- **page_size**: Items per page (default 25)", "operationId": "list_api_report_logs_v1_user_api_report_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "api", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api" } }, { "name": "from_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "From Date" } }, { "name": "to_date", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "To Date" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "default": 25, "title": "Page Size" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulations/runs": { "post": { "tags": [ "Simulation & Playground Data" ], "summary": "Record a Sandbox Simulation Run", "description": "Save an interactive playground execution run (inputs, outputs, latency, tokens).", "operationId": "create_simulation_run_v1_simulations_runs_post", "security": [ { "HTTPBearer": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationRun" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Create Simulation Run V1 Simulations Runs Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Simulation & Playground Data" ], "summary": "List Sandbox Simulation Runs", "description": "List simulation history for the current user/tenant with optional filters.", "operationId": "list_simulation_runs_v1_simulations_runs_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "domain", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by AI domain (chat, ocr, audio, etc.)", "title": "Domain" }, "description": "Filter by AI domain (chat, ocr, audio, etc.)" }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by status (success, failed)", "title": "Status" }, "description": "Filter by status (success, failed)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Skip" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulations/runs/{run_id}": { "get": { "tags": [ "Simulation & Playground Data" ], "summary": "Get Detailed Simulation Run", "description": "Retrieve full input/output payload and execution metrics for a specific run.", "operationId": "get_simulation_run_v1_simulations_runs__run_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Run Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Simulation & Playground Data" ], "summary": "Delete a Simulation Run", "operationId": "delete_simulation_run_v1_simulations_runs__run_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Run Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulations/chat/sessions": { "post": { "tags": [ "Simulation & Playground Data" ], "summary": "Create Multi-Turn Chat Conversation Session", "description": "Create a persistent conversation thread in the playground.", "operationId": "create_chat_session_v1_simulations_chat_sessions_post", "security": [ { "HTTPBearer": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateChatSessionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Simulation & Playground Data" ], "summary": "List User Chat Sessions", "operationId": "list_chat_sessions_v1_simulations_chat_sessions_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulations/chat/sessions/{session_id}": { "get": { "tags": [ "Simulation & Playground Data" ], "summary": "Get Chat Session Details", "operationId": "get_chat_session_v1_simulations_chat_sessions__session_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Simulation & Playground Data" ], "summary": "Delete Chat Session and Messages", "operationId": "delete_chat_session_v1_simulations_chat_sessions__session_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulations/chat/sessions/{session_id}/messages": { "post": { "tags": [ "Simulation & Playground Data" ], "summary": "Append Message to Chat Session", "description": "Record a user or assistant response into the conversation thread.", "operationId": "add_chat_message_v1_simulations_chat_sessions__session_id__messages_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddChatMessageRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Simulation & Playground Data" ], "summary": "Retrieve Message Thread History", "operationId": "get_chat_messages_v1_simulations_chat_sessions__session_id__messages_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 500, "minimum": 1, "default": 100, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulations/chat/templates": { "get": { "tags": [ "Simulation & Playground Data" ], "summary": "List Saved Prompt Templates", "operationId": "list_prompt_templates_v1_simulations_chat_templates_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "Simulation & Playground Data" ], "summary": "Save Custom Prompt Template", "operationId": "create_prompt_template_v1_simulations_chat_templates_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePromptTemplateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/simulations/ocr/records": { "post": { "tags": [ "Simulation & Playground Data" ], "summary": "Save OCR Document Extraction Record", "operationId": "create_ocr_record_v1_simulations_ocr_records_post", "security": [ { "HTTPBearer": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OCRDocumentRecord" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Simulation & Playground Data" ], "summary": "List OCR Document Records", "operationId": "list_ocr_records_v1_simulations_ocr_records_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "doc_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "id_card, driver_license, passport, invoice", "title": "Doc Type" }, "description": "id_card, driver_license, passport, invoice" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulations/ocr/records/{record_id}": { "get": { "tags": [ "Simulation & Playground Data" ], "summary": "Get Detailed OCR Record", "operationId": "get_ocr_record_v1_simulations_ocr_records__record_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "record_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Record Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulations/ekyc/sessions": { "post": { "tags": [ "Simulation & Playground Data" ], "summary": "Save eKYC Biometric Verification Run", "operationId": "create_ekyc_session_v1_simulations_ekyc_sessions_post", "security": [ { "HTTPBearer": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EKYCVerificationSession" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Simulation & Playground Data" ], "summary": "List eKYC Verification Sessions", "operationId": "list_ekyc_sessions_v1_simulations_ekyc_sessions_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulations/audio/transcriptions": { "post": { "tags": [ "Simulation & Playground Data" ], "summary": "Save STT Transcription Record", "operationId": "create_stt_record_v1_simulations_audio_transcriptions_post", "security": [ { "HTTPBearer": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AudioTranscriptionRecord" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Simulation & Playground Data" ], "summary": "List STT Transcription Records", "operationId": "list_stt_records_v1_simulations_audio_transcriptions_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulations/audio/syntheses": { "post": { "tags": [ "Simulation & Playground Data" ], "summary": "Save TTS Synthesis Record", "operationId": "create_tts_record_v1_simulations_audio_syntheses_post", "security": [ { "HTTPBearer": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AudioSynthesisRecord" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Simulation & Playground Data" ], "summary": "List TTS Synthesis Records", "operationId": "list_tts_records_v1_simulations_audio_syntheses_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/usage/summary": { "get": { "tags": [ "Usage Metering & Token Consumption" ], "summary": "Get Aggregated Token Usage and Cost Summary", "description": "Retrieve aggregate usage statistics (requests, tokens, cost) for tenant or organization.", "operationId": "get_usage_summary_v1_usage_summary_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Optional tenant filter", "title": "Tenant Id" }, "description": "Optional tenant filter" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/usage/records": { "get": { "tags": [ "Usage Metering & Token Consumption" ], "summary": "List Granular Inference Usage Records", "description": "Retrieve detailed log of recent inference token consumption records.", "operationId": "list_usage_records_v1_usage_records_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tenant_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by tenant ID", "title": "Tenant Id" }, "description": "Filter by tenant ID" }, { "name": "domain", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by service domain (e.g. chat, embedding)", "title": "Domain" }, "description": "Filter by service domain (e.g. chat, embedding)" }, { "name": "model_alias", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by model alias", "title": "Model Alias" }, "description": "Filter by model alias" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 500, "minimum": 1, "description": "Max number of records to return", "default": 50, "title": "Limit" }, "description": "Max number of records to return" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/usage/tpm": { "get": { "tags": [ "Usage Metering & Token Consumption" ], "summary": "Get Current Realtime TPM (Tokens Per Minute) Status", "description": "Check current minute's real-time token consumption against TPM quota limit.", "operationId": "get_realtime_tpm_v1_usage_tpm_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/knowledge/documents/upload": { "post": { "tags": [ "Knowledge & RAG" ], "summary": "Upload & Ingest Document into Knowledge Base", "description": "Upload a document (PDF, DOCX, TXT, MD), persist to MinIO,\ncreate MongoDB record, and queue background ingestion task via RabbitMQ.", "operationId": "upload_document_v1_knowledge_documents_upload_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_document_v1_knowledge_documents_upload_post" } } }, "required": true }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/knowledge/documents": { "get": { "tags": [ "Knowledge & RAG" ], "summary": "List Knowledge Base Documents", "description": "List documents for the current tenant with pagination.", "operationId": "list_documents_v1_knowledge_documents_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "department", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Department" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge/documents/{doc_id}": { "get": { "tags": [ "Knowledge & RAG" ], "summary": "Get Document Details & Ingestion Status", "description": "Retrieve document status and chunk metrics.", "operationId": "get_document_v1_knowledge_documents__doc_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Doc Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Knowledge & RAG" ], "summary": "Delete Document & Prune Vectors from Qdrant", "description": "Delete document from MongoDB and prune indexed vectors from Qdrant.", "operationId": "delete_document_v1_knowledge_documents__doc_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Doc Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge/feedback": { "post": { "tags": [ "Knowledge & RAG" ], "summary": "Record User Feedback for RAG Audit & Quality", "description": "Audit feedback for RAG quality evaluation.", "operationId": "record_feedback_v1_knowledge_feedback_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__api__knowledge__FeedbackRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/rag/chat": { "post": { "tags": [ "Knowledge & RAG" ], "summary": "Enterprise RAG Grounded Chat with Citations & Guardrails", "description": "Perform authenticated RAG question answering:\n1. Check Semantic Cache.\n2. Vectorize user query.\n3. Query Qdrant with tenant and ACL filters.\n4. Enforce anti-hallucination confidence threshold.\n5. Generate response with citations [1], [2].", "operationId": "rag_chat_v1_rag_chat_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RagChatRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RagChatResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/v1/keys": { "get": { "tags": [ "Admin & Staff - API Keys, Requests & Quota Control" ], "summary": "List All API Keys and Quotas from MongoDB Atlas", "operationId": "list_api_keys_admin_v1_keys_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "Admin & Staff - API Keys, Requests & Quota Control" ], "summary": "Create New API Key Direct (Admin Only)", "operationId": "create_api_key_admin_v1_keys_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAPIKeyRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/key-requests": { "post": { "tags": [ "Admin & Staff - API Keys, Requests & Quota Control" ], "summary": "Submit API Key Request (Staff Self-Service)", "operationId": "submit_key_request_v1_key_requests_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StaffKeyRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/v1/key-requests": { "get": { "tags": [ "Admin & Staff - API Keys, Requests & Quota Control" ], "summary": "List Pending Key Requests (Admin Only)", "operationId": "list_pending_key_requests_admin_v1_key_requests_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/v1/key-requests/{request_id}/approve": { "post": { "tags": [ "Admin & Staff - API Keys, Requests & Quota Control" ], "summary": "Approve Key Request (Admin Only)", "operationId": "approve_key_request_admin_v1_key_requests__request_id__approve_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Request Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/v1/key-requests/{request_id}/reject": { "post": { "tags": [ "Admin & Staff - API Keys, Requests & Quota Control" ], "summary": "Reject Key Request (Admin Only)", "operationId": "reject_key_request_admin_v1_key_requests__request_id__reject_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Request Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectRequestPayload" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/v1/keys/{key_id}/quota": { "put": { "tags": [ "Admin & Staff - API Keys, Requests & Quota Control" ], "summary": "Adjust Quota Limits in MongoDB Atlas", "operationId": "update_api_key_quota_admin_v1_keys__key_id__quota_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateQuotaRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/v1/keys/{key_id}": { "delete": { "tags": [ "Admin & Staff - API Keys, Requests & Quota Control" ], "summary": "Delete API Key from MongoDB Atlas", "operationId": "revoke_api_key_admin_v1_keys__key_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/v1/aliases": { "get": { "tags": [ "Admin - Model Aliases" ], "summary": "List Model Aliases from MongoDB Atlas", "operationId": "list_model_aliases_admin_v1_aliases_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/v1/aliases/{name}": { "put": { "tags": [ "Admin - Model Aliases" ], "summary": "Update Alias Status in MongoDB Atlas", "operationId": "update_alias_status_admin_v1_aliases__name__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string", "title": "Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AliasStatusUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/v1/audit-logs": { "get": { "tags": [ "Admin - Security & Audit Logs" ], "summary": "List Security & Action Audit Logs (Admin Only)", "operationId": "list_audit_logs_admin_v1_audit_logs_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/v1/endpoints": { "get": { "tags": [ "Admin - API Endpoints Management" ], "summary": "List All Exported API Endpoints from MongoDB Atlas", "operationId": "list_exported_endpoints_admin_v1_endpoints_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/v1/endpoints/{endpoint_id}": { "put": { "tags": [ "Admin - API Endpoints Management" ], "summary": "Update API Endpoint Export Status in MongoDB Atlas", "operationId": "update_endpoint_export_status_admin_v1_endpoints__endpoint_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EndpointStatusUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/v1/metrics": { "get": { "tags": [ "Admin - Realtime Metrics" ], "summary": "Get Active In-Flight Calls & Realtime Traffic Metrics", "operationId": "get_active_calls_metrics_admin_v1_metrics_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/v1/maintenance/status": { "get": { "tags": [ "Admin - System Maintenance & Emergency Circuit Breaker" ], "summary": "Get System Maintenance Status", "operationId": "get_maintenance_status_admin_v1_maintenance_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/v1/maintenance/toggle": { "post": { "tags": [ "Admin - System Maintenance & Emergency Circuit Breaker" ], "summary": "Toggle System Maintenance Mode (Emergency Circuit Breaker)", "operationId": "toggle_maintenance_admin_v1_maintenance_toggle_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToggleMaintenanceRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/v1/users": { "get": { "tags": [ "Admin - User & RBAC Governance" ], "summary": "List Registered Users (Admin Only)", "operationId": "list_users_admin_v1_users_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/v1/users/{user_id}/status": { "put": { "tags": [ "Admin - User & RBAC Governance" ], "summary": "Lock or Unlock User Account (Admin Only)", "operationId": "update_user_status_admin_v1_users__user_id__status_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStatusRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/v1/users/{user_id}/role": { "put": { "tags": [ "Admin - User & RBAC Governance" ], "summary": "Update User Role / RBAC Permission (Admin Only)", "operationId": "update_user_role_admin_v1_users__user_id__role_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateRoleRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/health": { "get": { "tags": [ "Status & Health Probes" ], "summary": "Basic Liveness Probe", "operationId": "health_check_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/health/live": { "get": { "tags": [ "Status & Health Probes" ], "summary": "Kubernetes Liveness Probe", "description": "Kubernetes Liveness Probe.\nVerifies that the ASGI event loop and HTTP server process are responsive.", "operationId": "liveness_probe_health_live_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/health/ready": { "get": { "tags": [ "Status & Health Probes" ], "summary": "Kubernetes Readiness Probe", "description": "Kubernetes Readiness Probe.\nProbes all essential upstream dependencies (MongoDB, Redis, RabbitMQ).\nReturns HTTP 200 if dependencies are healthy or running in allowed fallback mode,\nor HTTP 503 if critical storage/message broker infrastructure is down in production.", "operationId": "readiness_probe_health_ready_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/status": { "get": { "tags": [ "Status & Health Probes" ], "summary": "Comprehensive Platform Status Monitoring", "operationId": "platform_status_root_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/status": { "get": { "tags": [ "Status & Health Probes" ], "summary": "Comprehensive Platform Status Monitoring (v1)", "operationId": "platform_status_v1_v1_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/status/models": { "get": { "tags": [ "Status & Health Probes" ], "summary": "Status of Models Hosted on vLLM Engine", "operationId": "models_status_root_status_models_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/status/models": { "get": { "tags": [ "Status & Health Probes" ], "summary": "Status of Models Hosted on vLLM Engine (v1)", "operationId": "models_status_v1_v1_status_models_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/schemas": { "get": { "tags": [ "Dynamic Schema Registry" ], "summary": "List All AI Model JSON Schemas", "operationId": "list_model_schemas_v1_schemas_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/v1/schemas/{model_id}": { "get": { "tags": [ "Dynamic Schema Registry" ], "summary": "Get JSON Schema for Specific AI Model", "operationId": "get_model_schema_v1_schemas__model_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "model_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Model Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/models/{model_id}/schema": { "get": { "tags": [ "Dynamic Schema Registry" ], "summary": "Alias: Get Model Schema", "operationId": "get_model_schema_alias_v1_models__model_id__schema_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "model_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Model Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/admin/v1/resources/gpu": { "get": { "tags": [ "Admin - Hardware & Node Resources" ], "summary": "Get Live GPU Hardware Telemetry", "operationId": "get_gpu_resources_admin_v1_resources_gpu_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/admin/v1/resources/capacity": { "get": { "tags": [ "Admin - Hardware & Node Resources" ], "summary": "Get Cluster Node Capacity & Workload Allocations", "operationId": "get_cluster_capacity_admin_v1_resources_capacity_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } } }, "components": { "schemas": { "AddChatMessageRequest": { "properties": { "role": { "type": "string", "title": "Role", "description": "user, assistant, or system" }, "content": { "type": "string", "title": "Content" }, "prompt_tokens": { "type": "integer", "title": "Prompt Tokens", "default": 0 }, "completion_tokens": { "type": "integer", "title": "Completion Tokens", "default": 0 }, "latency_ms": { "type": "number", "title": "Latency Ms", "default": 0.0 } }, "type": "object", "required": [ "role", "content" ], "title": "AddChatMessageRequest" }, "AliasStatusUpdateRequest": { "properties": { "status": { "type": "string", "title": "Status", "description": "Status: 'enabled' or 'disabled'", "example": "enabled" } }, "type": "object", "required": [ "status" ], "title": "AliasStatusUpdateRequest" }, "ApiKeyCreateRequest": { "properties": { "name": { "type": "string", "title": "Name", "description": "Name / Label for the API key" }, "project_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Project Name", "default": "Default Project" } }, "type": "object", "required": [ "name" ], "title": "ApiKeyCreateRequest" }, "ApisStateUpdateRequest": { "properties": { "enabled_apis": { "additionalProperties": { "type": "boolean" }, "type": "object", "title": "Enabled Apis" } }, "type": "object", "required": [ "enabled_apis" ], "title": "ApisStateUpdateRequest" }, "AudioSynthesisRecord": { "properties": { "record_id": { "type": "string", "title": "Record Id" }, "user_id": { "type": "string", "title": "User Id", "default": "admin@company.com" }, "tenant_id": { "type": "string", "title": "Tenant Id", "default": "default" }, "input_text": { "type": "string", "title": "Input Text" }, "voice_id": { "type": "string", "title": "Voice Id", "default": "northern-female" }, "speed": { "type": "number", "title": "Speed", "default": 1.0 }, "pitch": { "type": "number", "title": "Pitch", "default": 1.0 }, "output_audio_url": { "type": "string", "title": "Output Audio Url" }, "audio_format": { "type": "string", "title": "Audio Format", "default": "mp3" }, "duration_seconds": { "type": "number", "title": "Duration Seconds", "default": 0.0 }, "latency_ms": { "type": "number", "title": "Latency Ms", "default": 0.0 }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "input_text", "output_audio_url" ], "title": "AudioSynthesisRecord", "description": "Entity storing Text-to-Speech generated voice syntheses." }, "AudioTranscriptionRecord": { "properties": { "record_id": { "type": "string", "title": "Record Id" }, "user_id": { "type": "string", "title": "User Id", "default": "admin@company.com" }, "tenant_id": { "type": "string", "title": "Tenant Id", "default": "default" }, "audio_url": { "type": "string", "title": "Audio Url" }, "duration_seconds": { "type": "number", "title": "Duration Seconds", "default": 0.0 }, "sample_rate": { "type": "integer", "title": "Sample Rate", "default": 16000 }, "transcription_text": { "type": "string", "title": "Transcription Text" }, "word_timestamps": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Word Timestamps" }, "language_detected": { "type": "string", "title": "Language Detected", "default": "vi" }, "confidence": { "type": "number", "title": "Confidence", "default": 1.0 }, "latency_ms": { "type": "number", "title": "Latency Ms", "default": 0.0 }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "audio_url", "transcription_text" ], "title": "AudioTranscriptionRecord", "description": "Entity storing Speech-to-Text audio transcriptions." }, "Body_create_transcription_v1_audio_transcriptions_post": { "properties": { "file": { "type": "string", "contentMediaType": "application/octet-stream", "title": "File" }, "model": { "type": "string", "title": "Model", "default": "stt-vn-standard" }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language", "default": "vi" } }, "type": "object", "required": [ "file" ], "title": "Body_create_transcription_v1_audio_transcriptions_post" }, "Body_edit_images_v1_images_edits_post": { "properties": { "image": { "type": "string", "contentMediaType": "application/octet-stream", "title": "Image" }, "prompt": { "type": "string", "title": "Prompt" }, "mask": { "anyOf": [ { "type": "string", "contentMediaType": "application/octet-stream" }, { "type": "null" } ], "title": "Mask" }, "model": { "type": "string", "title": "Model", "default": "image-gen-standard" }, "n": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "N", "default": 1 }, "size": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Size", "default": "1024x1024" } }, "type": "object", "required": [ "image", "prompt" ], "title": "Body_edit_images_v1_images_edits_post" }, "Body_ocr_driver_license_v1_ocr_driver_license_post": { "properties": { "image": { "type": "string", "contentMediaType": "application/octet-stream", "title": "Image" } }, "type": "object", "required": [ "image" ], "title": "Body_ocr_driver_license_v1_ocr_driver_license_post" }, "Body_ocr_id_card_v1_ocr_id_card_post": { "properties": { "image": { "anyOf": [ { "type": "string", "contentMediaType": "application/octet-stream" }, { "type": "null" } ], "title": "Image" }, "image_back": { "anyOf": [ { "type": "string", "contentMediaType": "application/octet-stream" }, { "type": "null" } ], "title": "Image Back" }, "file": { "anyOf": [ { "type": "string", "contentMediaType": "application/octet-stream" }, { "type": "null" } ], "title": "File" }, "side": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Side" }, "card_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Card Type" } }, "type": "object", "title": "Body_ocr_id_card_v1_ocr_id_card_post" }, "Body_ocr_passport_v1_ocr_passport_post": { "properties": { "image": { "type": "string", "contentMediaType": "application/octet-stream", "title": "Image" } }, "type": "object", "required": [ "image" ], "title": "Body_ocr_passport_v1_ocr_passport_post" }, "Body_ocr_process_document_v1_ocr_post": { "properties": { "file": { "type": "string", "contentMediaType": "application/octet-stream", "title": "File" } }, "type": "object", "required": [ "file" ], "title": "Body_ocr_process_document_v1_ocr_post" }, "Body_ocr_process_document_v1_ocr_process_post": { "properties": { "file": { "type": "string", "contentMediaType": "application/octet-stream", "title": "File" } }, "type": "object", "required": [ "file" ], "title": "Body_ocr_process_document_v1_ocr_process_post" }, "Body_upload_document_v1_knowledge_documents_upload_post": { "properties": { "file": { "type": "string", "contentMediaType": "application/octet-stream", "title": "File" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "department": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Department" }, "allowed_roles": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Allowed Roles", "default": "*" } }, "type": "object", "required": [ "file" ], "title": "Body_upload_document_v1_knowledge_documents_upload_post" }, "Body_vision_facematch_v1_vision_facematch_post": { "properties": { "image_cccd": { "type": "string", "contentMediaType": "application/octet-stream", "title": "Image Cccd" }, "image_selfie": { "type": "string", "contentMediaType": "application/octet-stream", "title": "Image Selfie" } }, "type": "object", "required": [ "image_cccd", "image_selfie" ], "title": "Body_vision_facematch_v1_vision_facematch_post" }, "Body_vision_liveness_v1_vision_liveness_post": { "properties": { "video": { "type": "string", "contentMediaType": "application/octet-stream", "title": "Video" }, "mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mode", "default": "passive" } }, "type": "object", "required": [ "video" ], "title": "Body_vision_liveness_v1_vision_liveness_post" }, "ChatCompletionRequest": { "properties": { "model": { "type": "string", "title": "Model", "example": "chat-general-standard" }, "messages": { "items": { "$ref": "#/components/schemas/ChatMessage" }, "type": "array", "title": "Messages", "example": [ { "content": "Xin chào! Bạn có thể giới thiệu về khả năng của mình được không?", "role": "user" } ] }, "temperature": { "anyOf": [ { "type": "number", "maximum": 2.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Temperature", "default": 0.7 }, "top_p": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Top P", "default": 1.0 }, "n": { "anyOf": [ { "type": "integer", "maximum": 5.0, "minimum": 1.0 }, { "type": "null" } ], "title": "N", "default": 1 }, "stream": { "type": "boolean", "title": "Stream", "default": false, "example": false }, "max_tokens": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Max Tokens", "default": 1024, "example": 1024 }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" } }, "type": "object", "required": [ "model", "messages" ], "title": "ChatCompletionRequest" }, "ChatMessage": { "properties": { "role": { "type": "string", "enum": [ "system", "user", "assistant", "function", "tool" ], "title": "Role", "example": "user" }, "content": { "type": "string", "title": "Content", "example": "Hello, AI Platform!" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" } }, "type": "object", "required": [ "role", "content" ], "title": "ChatMessage" }, "CompletionRequest": { "properties": { "model": { "type": "string", "title": "Model", "example": "chat-general-standard" }, "prompt": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ], "title": "Prompt", "example": "Once upon a time in AI Platform," }, "max_tokens": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Max Tokens", "default": 64 }, "temperature": { "anyOf": [ { "type": "number", "maximum": 2.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Temperature", "default": 0.7 }, "stream": { "type": "boolean", "title": "Stream", "default": false, "example": false } }, "type": "object", "required": [ "model", "prompt" ], "title": "CompletionRequest" }, "ContactMessageRequest": { "properties": { "name": { "type": "string", "title": "Name" }, "phone": { "type": "string", "title": "Phone" }, "email": { "type": "string", "title": "Email" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "name", "phone", "email", "message" ], "title": "ContactMessageRequest" }, "CreateAPIKeyRequest": { "properties": { "tenant_id": { "type": "string", "title": "Tenant Id", "example": "TENANT_RETAIL_BANK" }, "rpm_limit": { "type": "integer", "title": "Rpm Limit", "default": 60, "example": 60 }, "tpm_limit": { "type": "integer", "title": "Tpm Limit", "default": 100000, "example": 100000 }, "concurrency_limit": { "type": "integer", "title": "Concurrency Limit", "default": 5, "example": 5 }, "expires_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Expires At", "example": "2026-12-31T23:59:59Z" } }, "type": "object", "required": [ "tenant_id" ], "title": "CreateAPIKeyRequest" }, "CreateChatSessionRequest": { "properties": { "title": { "type": "string", "title": "Title", "default": "New Conversation" }, "model_alias": { "type": "string", "title": "Model Alias", "default": "chat-general-standard" }, "system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Prompt" }, "temperature": { "type": "number", "title": "Temperature", "default": 0.7 }, "max_tokens": { "type": "integer", "title": "Max Tokens", "default": 1024 } }, "type": "object", "title": "CreateChatSessionRequest" }, "CreatePromptTemplateRequest": { "properties": { "title": { "type": "string", "title": "Title" }, "category": { "type": "string", "title": "Category", "default": "general" }, "template_content": { "type": "string", "title": "Template Content" }, "variables": { "items": { "type": "string" }, "type": "array", "title": "Variables" }, "is_public": { "type": "boolean", "title": "Is Public", "default": false } }, "type": "object", "required": [ "title", "template_content" ], "title": "CreatePromptTemplateRequest" }, "DocumentListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/DocumentResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "items", "total", "page", "page_size" ], "title": "DocumentListResponse" }, "DocumentResponse": { "properties": { "doc_id": { "type": "string", "title": "Doc Id" }, "tenant_id": { "type": "string", "title": "Tenant Id" }, "title": { "type": "string", "title": "Title" }, "filename": { "type": "string", "title": "Filename" }, "file_type": { "type": "string", "title": "File Type" }, "file_size_bytes": { "type": "integer", "title": "File Size Bytes" }, "status": { "type": "string", "title": "Status" }, "total_chunks": { "type": "integer", "title": "Total Chunks" }, "department": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Department" }, "allowed_roles": { "items": { "type": "string" }, "type": "array", "title": "Allowed Roles" }, "created_at": { "type": "string", "title": "Created At" }, "updated_at": { "type": "string", "title": "Updated At" }, "s3_uri": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "S3 Uri" } }, "type": "object", "required": [ "doc_id", "tenant_id", "title", "filename", "file_type", "file_size_bytes", "status", "total_chunks", "created_at", "updated_at" ], "title": "DocumentResponse" }, "EKYCVerificationSession": { "properties": { "session_id": { "type": "string", "title": "Session Id" }, "user_id": { "type": "string", "title": "User Id", "default": "admin@company.com" }, "tenant_id": { "type": "string", "title": "Tenant Id", "default": "default" }, "id_card_image_url": { "type": "string", "title": "Id Card Image Url" }, "selfie_image_url": { "type": "string", "title": "Selfie Image Url" }, "facematch_score": { "type": "number", "maximum": 100.0, "minimum": 0.0, "title": "Facematch Score", "default": 0.0 }, "liveness_score": { "type": "number", "maximum": 100.0, "minimum": 0.0, "title": "Liveness Score", "default": 0.0 }, "is_live": { "type": "boolean", "title": "Is Live", "default": true }, "decision": { "type": "string", "enum": [ "approved", "rejected", "manual_review" ], "title": "Decision", "default": "approved" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "latency_ms": { "type": "number", "title": "Latency Ms", "default": 0.0 }, "verified_at": { "type": "string", "format": "date-time", "title": "Verified At" } }, "type": "object", "required": [ "id_card_image_url", "selfie_image_url" ], "title": "EKYCVerificationSession", "description": "Entity storing an eKYC biometric verification session." }, "EmbeddingData": { "properties": { "object": { "type": "string", "title": "Object", "default": "embedding" }, "index": { "type": "integer", "title": "Index", "default": 0 }, "embedding": { "items": { "type": "number" }, "type": "array", "title": "Embedding" } }, "type": "object", "required": [ "embedding" ], "title": "EmbeddingData" }, "EmbeddingRequest": { "properties": { "model": { "type": "string", "title": "Model", "example": "embed-standard" }, "input": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ], "title": "Input", "example": "Embedding Input" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" } }, "type": "object", "required": [ "model", "input" ], "title": "EmbeddingRequest" }, "EmbeddingResponse": { "properties": { "object": { "type": "string", "title": "Object", "default": "list" }, "data": { "items": { "$ref": "#/components/schemas/EmbeddingData" }, "type": "array", "title": "Data" }, "model": { "type": "string", "title": "Model" }, "usage": { "$ref": "#/components/schemas/UsageInfo" } }, "type": "object", "required": [ "data", "model", "usage" ], "title": "EmbeddingResponse" }, "EndpointStatusUpdateRequest": { "properties": { "status": { "type": "string", "title": "Status", "description": "Export Status: 'enabled' or 'disabled'", "example": "enabled" } }, "type": "object", "required": [ "status" ], "title": "EndpointStatusUpdateRequest" }, "FaceMatchData": { "properties": { "matched": { "type": "boolean", "title": "Matched", "description": "Whether the two face images belong to the same person" }, "confidence": { "type": "number", "title": "Confidence", "description": "Cosine similarity / match probability score (0.0 to 1.0)", "example": 0.965 }, "threshold": { "type": "number", "title": "Threshold", "description": "Verification decision threshold", "default": 0.8 }, "message": { "type": "string", "title": "Message", "description": "Verification result description" } }, "type": "object", "required": [ "matched", "confidence", "message" ], "title": "FaceMatchData" }, "FaceMatchMetadata": { "properties": { "backend": { "type": "string", "title": "Backend", "description": "Biometric verification engine" }, "device": { "type": "string", "title": "Device", "description": "Compute accelerator" }, "latency_ms": { "type": "number", "title": "Latency Ms", "description": "Inference latency in milliseconds" }, "cached": { "type": "boolean", "title": "Cached", "description": "Whether result was served from cache", "default": false }, "cache_node": { "type": "string", "title": "Cache Node", "description": "Serving cache node", "default": "direct-gpu-compute" }, "request_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Request Id", "description": "Request transaction ID" } }, "type": "object", "required": [ "backend", "device", "latency_ms" ], "title": "FaceMatchMetadata" }, "FaceMatchResponse": { "properties": { "id": { "type": "string", "title": "Id", "description": "Transaction tracking ID", "example": "face_66fd3b8a1c90" }, "object": { "type": "string", "title": "Object", "description": "Entity type identifier", "default": "vision.facematch" }, "created": { "type": "integer", "title": "Created", "description": "Unix timestamp" }, "model": { "type": "string", "title": "Model", "description": "Model alias used", "default": "vision-facematch" }, "status": { "type": "string", "title": "Status", "description": "Status", "default": "success" }, "matched": { "type": "boolean", "title": "Matched", "description": "Convenience flag for match status" }, "confidence": { "type": "number", "title": "Confidence", "description": "Match confidence score" }, "data": { "$ref": "#/components/schemas/FaceMatchData", "description": "Detailed verification payload" }, "metadata": { "$ref": "#/components/schemas/FaceMatchMetadata", "description": "Operational & hardware telemetry" } }, "type": "object", "required": [ "id", "created", "matched", "confidence", "data", "metadata" ], "title": "FaceMatchResponse" }, "ForgotPasswordRequest": { "properties": { "email": { "type": "string", "title": "Email", "example": "dev_namle@company.com" }, "new_password": { "type": "string", "title": "New Password", "example": "newsecret123" } }, "type": "object", "required": [ "email", "new_password" ], "title": "ForgotPasswordRequest" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "ImageData": { "properties": { "url": { "type": "string", "title": "Url" } }, "type": "object", "required": [ "url" ], "title": "ImageData" }, "ImageGenerationRequest": { "properties": { "model": { "type": "string", "title": "Model", "default": "image-gen-standard", "example": "image-gen-standard" }, "prompt": { "type": "string", "title": "Prompt", "example": "a high tech AI inference gateway in cyber style" }, "n": { "anyOf": [ { "type": "integer", "maximum": 4.0, "minimum": 1.0 }, { "type": "null" } ], "title": "N", "default": 1 }, "size": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Size", "default": "1024x1024", "example": "1024x1024" }, "response_format": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Response Format", "default": "url", "example": "url" } }, "type": "object", "required": [ "prompt" ], "title": "ImageGenerationRequest" }, "ImageGenerationResponse": { "properties": { "created": { "type": "integer", "title": "Created" }, "data": { "items": { "$ref": "#/components/schemas/ImageData" }, "type": "array", "title": "Data" } }, "type": "object", "required": [ "data" ], "title": "ImageGenerationResponse" }, "JobCreateRequest": { "properties": { "job_type": { "type": "string", "title": "Job Type", "example": "video_generation" }, "alias_name": { "type": "string", "title": "Alias Name", "example": "video-gen-standard" }, "payload": { "additionalProperties": true, "type": "object", "title": "Payload" }, "webhook_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Webhook Url" } }, "type": "object", "required": [ "job_type", "alias_name" ], "title": "JobCreateRequest" }, "JobStatusResponse": { "properties": { "job_id": { "type": "string", "title": "Job Id" }, "job_type": { "type": "string", "title": "Job Type" }, "alias_name": { "type": "string", "title": "Alias Name" }, "status": { "type": "string", "enum": [ "queued", "running", "completed", "failed", "cancelled", "expired" ], "title": "Status" }, "progress": { "type": "integer", "maximum": 100.0, "minimum": 0.0, "title": "Progress", "default": 0 }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "result_urls": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Result Urls" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "job_id", "job_type", "alias_name", "status", "created_at", "updated_at" ], "title": "JobStatusResponse" }, "LivenessData": { "properties": { "is_live": { "type": "boolean", "title": "Is Live", "description": "Whether the subject is a live person (anti-spoofing)" }, "score": { "type": "number", "title": "Score", "description": "Liveness certainty score (0.0 to 1.0)", "example": 0.995 }, "mode": { "type": "string", "title": "Mode", "description": "Detection mode (passive / active)", "default": "passive" }, "details": { "type": "string", "title": "Details", "description": "Verification diagnostics" } }, "type": "object", "required": [ "is_live", "score", "details" ], "title": "LivenessData" }, "LivenessResponse": { "properties": { "id": { "type": "string", "title": "Id", "description": "Transaction tracking ID" }, "object": { "type": "string", "title": "Object", "description": "Entity type identifier", "default": "vision.liveness" }, "created": { "type": "integer", "title": "Created", "description": "Unix timestamp" }, "model": { "type": "string", "title": "Model", "description": "Model alias used", "default": "vision-liveness" }, "status": { "type": "string", "title": "Status", "description": "Status", "default": "success" }, "is_live": { "type": "boolean", "title": "Is Live", "description": "Convenience flag for liveness status" }, "score": { "type": "number", "title": "Score", "description": "Liveness score" }, "data": { "$ref": "#/components/schemas/LivenessData", "description": "Detailed liveness metrics" }, "metadata": { "$ref": "#/components/schemas/FaceMatchMetadata", "description": "Operational & hardware telemetry" } }, "type": "object", "required": [ "id", "created", "is_live", "score", "data", "metadata" ], "title": "LivenessResponse" }, "LoginRequest": { "properties": { "email": { "type": "string", "title": "Email", "example": "admin@company.com" }, "password": { "type": "string", "title": "Password", "example": "admin123" } }, "type": "object", "required": [ "email", "password" ], "title": "LoginRequest" }, "ModerationRequest": { "properties": { "input": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ], "title": "Input", "example": "Kiem tra noi dung an toan" }, "model": { "type": "string", "title": "Model", "default": "moderation-multimodal", "example": "moderation-multimodal" } }, "type": "object", "required": [ "input" ], "title": "ModerationRequest" }, "OCRDocumentRecord": { "properties": { "record_id": { "type": "string", "title": "Record Id" }, "user_id": { "type": "string", "title": "User Id", "default": "admin@company.com" }, "tenant_id": { "type": "string", "title": "Tenant Id", "default": "default" }, "doc_type": { "type": "string", "enum": [ "id_card", "driver_license", "passport", "invoice", "general" ], "title": "Doc Type", "default": "id_card" }, "image_url": { "type": "string", "title": "Image Url" }, "cropped_portrait_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cropped Portrait Url" }, "extracted_data": { "additionalProperties": true, "type": "object", "title": "Extracted Data" }, "confidence_scores": { "additionalProperties": { "type": "number" }, "type": "object", "title": "Confidence Scores" }, "is_tampered": { "type": "boolean", "title": "Is Tampered", "default": false }, "tamper_warning": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tamper Warning" }, "latency_ms": { "type": "number", "title": "Latency Ms", "default": 0.0 }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "image_url" ], "title": "OCRDocumentRecord", "description": "Entity storing OCR document image and extracted structured fields." }, "PaymentCreateRequest": { "properties": { "amount": { "type": "integer", "title": "Amount", "description": "Payment amount in VND" }, "package": { "type": "string", "title": "Package", "description": "Selected package name" }, "project": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Project", "default": "Default Project" } }, "type": "object", "required": [ "amount", "package" ], "title": "PaymentCreateRequest" }, "PredictionRequest": { "properties": { "alias_name": { "type": "string", "title": "Alias Name", "example": "translate-vi-standard" }, "payload": { "additionalProperties": true, "type": "object", "title": "Payload" } }, "type": "object", "required": [ "alias_name" ], "title": "PredictionRequest" }, "ProjectCreateRequest": { "properties": { "project_name": { "type": "string", "title": "Project Name", "description": "Name of the project" }, "billing_type": { "type": "string", "title": "Billing Type", "description": "Billing type: prepaid or postpaid", "default": "prepaid" } }, "type": "object", "required": [ "project_name" ], "title": "ProjectCreateRequest" }, "RagChatRequest": { "properties": { "query": { "type": "string", "minLength": 2, "title": "Query", "description": "User question to answer against knowledge base" }, "conversation_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Conversation Id", "description": "Optional conversation session ID" }, "history": { "anyOf": [ { "items": { "additionalProperties": { "type": "string" }, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "History", "description": "Previous conversation turns for multi-turn context (e.g. [{\"role\": \"user\", \"content\": \"...\"}])" }, "model": { "type": "string", "title": "Model", "description": "Model alias for LLM reasoning", "default": "chat-general-standard" }, "department": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Department", "description": "Filter documents by department" }, "doc_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Doc Ids", "description": "Restrict search to specific document IDs" }, "similarity_threshold": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Similarity Threshold", "description": "Minimum cosine similarity score required; queries below this will be rejected to prevent hallucination", "default": 0.65 }, "top_k": { "type": "integer", "maximum": 20.0, "minimum": 1.0, "title": "Top K", "description": "Number of context chunks to retrieve", "default": 4 }, "temperature": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Temperature", "description": "Low temperature for factual accuracy", "default": 0.2 }, "max_tokens": { "type": "integer", "maximum": 4096.0, "minimum": 64.0, "title": "Max Tokens", "default": 1024 }, "stream": { "type": "boolean", "title": "Stream", "description": "Whether to stream response tokens via Server-Sent Events (SSE)", "default": false } }, "type": "object", "required": [ "query" ], "title": "RagChatRequest" }, "RagChatResponse": { "properties": { "answer": { "type": "string", "title": "Answer" }, "model": { "type": "string", "title": "Model" }, "citations": { "items": { "$ref": "#/components/schemas/RagCitation" }, "type": "array", "title": "Citations" }, "grounded": { "type": "boolean", "title": "Grounded" }, "latency_ms": { "type": "integer", "title": "Latency Ms" }, "usage": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Usage" }, "conversation_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Conversation Id" } }, "type": "object", "required": [ "answer", "model", "citations", "grounded", "latency_ms", "usage" ], "title": "RagChatResponse" }, "RagCitation": { "properties": { "index": { "type": "integer", "title": "Index" }, "doc_id": { "type": "string", "title": "Doc Id" }, "title": { "type": "string", "title": "Title" }, "page_number": { "type": "integer", "title": "Page Number" }, "score": { "type": "number", "title": "Score" }, "excerpt": { "type": "string", "title": "Excerpt" } }, "type": "object", "required": [ "index", "doc_id", "title", "page_number", "score", "excerpt" ], "title": "RagCitation" }, "RechargeBalanceRequest": { "properties": { "credits": { "type": "integer", "title": "Credits" }, "amount": { "type": "string", "title": "Amount" }, "package": { "type": "string", "title": "Package" }, "project": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Project", "default": "default" } }, "type": "object", "required": [ "credits", "amount", "package" ], "title": "RechargeBalanceRequest" }, "RejectRequestPayload": { "properties": { "reason": { "type": "string", "title": "Reason", "example": "Exceeds department quota limit" } }, "type": "object", "required": [ "reason" ], "title": "RejectRequestPayload" }, "SignupRequest": { "properties": { "email": { "type": "string", "title": "Email", "example": "staff_namle@company.com" }, "password": { "type": "string", "title": "Password", "example": "secret123" }, "full_name": { "type": "string", "title": "Full Name", "example": "Nam Le Developer" }, "role": { "type": "string", "title": "Role", "description": "'staff' or 'admin'", "default": "staff", "example": "staff" } }, "type": "object", "required": [ "email", "password", "full_name" ], "title": "SignupRequest" }, "SimulationRun": { "properties": { "run_id": { "type": "string", "title": "Run Id" }, "user_id": { "type": "string", "title": "User Id", "default": "admin@company.com" }, "tenant_id": { "type": "string", "title": "Tenant Id", "default": "default" }, "project_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Project Id" }, "domain": { "type": "string", "enum": [ "chat", "ocr", "vision", "audio", "nlp", "image", "moderation", "general" ], "title": "Domain", "default": "general" }, "model_alias": { "type": "string", "title": "Model Alias" }, "input_payload": { "additionalProperties": true, "type": "object", "title": "Input Payload" }, "output_payload": { "additionalProperties": true, "type": "object", "title": "Output Payload" }, "status": { "type": "string", "enum": [ "success", "failed", "running" ], "title": "Status", "default": "success" }, "latency_ms": { "type": "number", "title": "Latency Ms", "default": 0.0 }, "token_usage": { "anyOf": [ { "additionalProperties": { "type": "integer" }, "type": "object" }, { "type": "null" } ], "title": "Token Usage" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "model_alias" ], "title": "SimulationRun", "description": "Entity tracking individual interactive playground / sandbox simulation runs." }, "SpeechRequest": { "properties": { "model": { "type": "string", "title": "Model", "default": "tts-vi-standard", "example": "tts-vi-standard" }, "input": { "type": "string", "title": "Input", "example": "Xin chào, đây là hệ thống chuyển đổi văn bản thành giọng nói." }, "voice": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Voice", "default": "northern_female", "example": "northern_female" }, "response_format": { "type": "string", "title": "Response Format", "default": "mp3", "example": "mp3" } }, "type": "object", "required": [ "input" ], "title": "SpeechRequest" }, "StaffKeyRequest": { "properties": { "tenant_id": { "type": "string", "title": "Tenant Id", "example": "TENANT_RETAIL_BANK" }, "requested_by": { "type": "string", "title": "Requested By", "example": "dev_namle@company.com" }, "justification": { "type": "string", "title": "Justification", "example": "Project Chatbot AI Integration" }, "rpm_limit": { "type": "integer", "title": "Rpm Limit", "default": 60, "example": 60 }, "tpm_limit": { "type": "integer", "title": "Tpm Limit", "default": 100000, "example": 100000 }, "concurrency_limit": { "type": "integer", "title": "Concurrency Limit", "default": 5, "example": 5 } }, "type": "object", "required": [ "tenant_id", "requested_by", "justification" ], "title": "StaffKeyRequest" }, "SummarizationRequest": { "properties": { "document": { "type": "string", "title": "Document", "example": "Văn bản tài liệu dài cần tóm tắt..." }, "ratio": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Ratio", "description": "Tỷ lệ tóm tắt văn bản", "default": 0.2 } }, "type": "object", "required": [ "document" ], "title": "SummarizationRequest" }, "ToggleMaintenanceRequest": { "properties": { "is_maintenance": { "type": "boolean", "title": "Is Maintenance" }, "reason": { "type": "string", "title": "Reason", "default": "Emergency GPU Cluster Stop" } }, "type": "object", "required": [ "is_maintenance" ], "title": "ToggleMaintenanceRequest" }, "TranslationMetadata": { "properties": { "backend": { "type": "string", "title": "Backend", "description": "Inference engine backend runtime" }, "device": { "type": "string", "title": "Device", "description": "Target compute hardware accelerator (cuda / cpu)" }, "compute_type": { "type": "string", "title": "Compute Type", "description": "Quantization precision (int8 / float16)" }, "beam_size": { "type": "integer", "title": "Beam Size", "description": "Beam size used for decoding" }, "repetition_penalty": { "type": "number", "title": "Repetition Penalty", "description": "Penalty applied to repeated n-grams", "default": 1.2 }, "no_repeat_ngram_size": { "type": "integer", "title": "No Repeat Ngram Size", "description": "N-gram repetition suppression window", "default": 3 }, "latency_ms": { "type": "number", "title": "Latency Ms", "description": "Execution latency in milliseconds" }, "cached": { "type": "boolean", "title": "Cached", "description": "Whether the inference response was served from cache", "default": false }, "cache_node": { "type": "string", "title": "Cache Node", "description": "Serving cache node / hardware tier", "default": "direct-gpu-compute" }, "request_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Request Id", "description": "System request tracing ID" } }, "type": "object", "required": [ "backend", "device", "compute_type", "beam_size", "latency_ms" ], "title": "TranslationMetadata" }, "TranslationPayloadData": { "properties": { "translated_text": { "type": "string", "title": "Translated Text", "description": "The translated result text" }, "source_language": { "type": "string", "title": "Source Language", "description": "Resolved source language code" }, "target_language": { "type": "string", "title": "Target Language", "description": "Resolved target language code" }, "detected_source_language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Detected Source Language", "description": "Auto-detected language code" } }, "type": "object", "required": [ "translated_text", "source_language", "target_language" ], "title": "TranslationPayloadData" }, "TranslationRequest": { "properties": { "text": { "type": "string", "title": "Text", "example": "Xin chào thế giới, chào mừng đến với AIP Platform." }, "source_lang": { "type": "string", "title": "Source Lang", "default": "vi", "example": "vi" }, "target_lang": { "type": "string", "title": "Target Lang", "default": "en", "example": "en" }, "beam_size": { "anyOf": [ { "type": "integer", "maximum": 10.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Beam Size", "description": "Beam search width (1 to 10)" } }, "type": "object", "required": [ "text" ], "title": "TranslationRequest" }, "TranslationResponse": { "properties": { "id": { "type": "string", "title": "Id", "description": "Unique transaction ID for this translation request", "example": "trans_66fd3b8a1c90" }, "object": { "type": "string", "title": "Object", "description": "Response entity type", "default": "nlp.translation" }, "created": { "type": "integer", "title": "Created", "description": "Unix timestamp when translation was generated" }, "model": { "type": "string", "title": "Model", "description": "Model alias / ID used for inference", "example": "translate-vi-standard" }, "status": { "type": "string", "title": "Status", "description": "Execution status", "default": "success" }, "translated_text": { "type": "string", "title": "Translated Text", "description": "Direct convenience field for translated text" }, "source_lang": { "type": "string", "title": "Source Lang", "description": "Source language code" }, "target_lang": { "type": "string", "title": "Target Lang", "description": "Target language code" }, "data": { "$ref": "#/components/schemas/TranslationPayloadData", "description": "Detailed structured translation payload" }, "usage": { "$ref": "#/components/schemas/TranslationUsage", "description": "Token and character consumption metrics for quota/billing" }, "metadata": { "$ref": "#/components/schemas/TranslationMetadata", "description": "Operational & hardware telemetry metadata" } }, "type": "object", "required": [ "id", "created", "model", "translated_text", "source_lang", "target_lang", "data", "usage", "metadata" ], "title": "TranslationResponse" }, "TranslationUsage": { "properties": { "prompt_tokens": { "type": "integer", "title": "Prompt Tokens", "description": "Number of tokens in source text input" }, "completion_tokens": { "type": "integer", "title": "Completion Tokens", "description": "Number of tokens generated in translation" }, "total_tokens": { "type": "integer", "title": "Total Tokens", "description": "Total tokens processed (prompt + completion)" }, "character_count": { "type": "integer", "title": "Character Count", "description": "Total characters in input string" }, "word_count": { "type": "integer", "title": "Word Count", "description": "Total words in input string" } }, "type": "object", "required": [ "prompt_tokens", "completion_tokens", "total_tokens", "character_count", "word_count" ], "title": "TranslationUsage" }, "UpdateQuotaRequest": { "properties": { "rpm_limit": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Rpm Limit", "description": "Requests Per Minute limit", "example": 120 }, "tpm_limit": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Tpm Limit", "description": "Tokens Per Minute limit", "example": 200000 }, "concurrency_limit": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Concurrency Limit", "description": "Max concurrent requests limit", "example": 10 } }, "type": "object", "title": "UpdateQuotaRequest" }, "UpdateRoleRequest": { "properties": { "role": { "type": "string", "title": "Role", "description": "'admin', 'staff', or 'manager'", "example": "admin" } }, "type": "object", "required": [ "role" ], "title": "UpdateRoleRequest" }, "UpdateStatusRequest": { "properties": { "status": { "type": "string", "title": "Status", "description": "'active' or 'locked'", "example": "locked" } }, "type": "object", "required": [ "status" ], "title": "UpdateStatusRequest" }, "UsageInfo": { "properties": { "prompt_tokens": { "type": "integer", "title": "Prompt Tokens", "default": 0 }, "completion_tokens": { "type": "integer", "title": "Completion Tokens", "default": 0 }, "total_tokens": { "type": "integer", "title": "Total Tokens", "default": 0 } }, "type": "object", "title": "UsageInfo" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" }, "input": { "title": "Input" }, "ctx": { "type": "object", "title": "Context" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "src__api__knowledge__FeedbackRequest": { "properties": { "query": { "type": "string", "title": "Query" }, "response_text": { "type": "string", "title": "Response Text" }, "rating": { "type": "integer", "maximum": 1.0, "minimum": -1.0, "title": "Rating", "description": "1 for Thumbs Up, -1 for Thumbs Down" }, "comments": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Comments" }, "cited_doc_ids": { "items": { "type": "string" }, "type": "array", "title": "Cited Doc Ids" } }, "type": "object", "required": [ "query", "response_text", "rating" ], "title": "FeedbackRequest" }, "src__api__user_portal__FeedbackRequest": { "properties": { "category": { "type": "string", "title": "Category", "default": "feature" }, "title": { "type": "string", "title": "Title" }, "description": { "type": "string", "title": "Description" } }, "type": "object", "required": [ "title", "description" ], "title": "FeedbackRequest" } }, "securitySchemes": { "HTTPBearer": { "type": "http", "scheme": "bearer" } } }, "tags": [ { "name": "Chat Completions", "description": "Standard OpenAI-compatible Chat completion & reasoning interface (Qwen2.5 / DeepSeek with SSE Streaming)." }, { "name": "Completions", "description": "Raw text prompt completion interface." }, { "name": "Embeddings", "description": "Dense high-dimensional vector embeddings for semantic search & RAG." }, { "name": "Audio (STT & TTS)", "description": "Audio transcription (Whisper ASR) & Speech synthesis (viXTTS)." }, { "name": "Images", "description": "Text-to-image generation via FLUX.1 & Stable Diffusion XL." }, { "name": "Moderations", "description": "Content safety, toxicity detection & policy enforcement (Llama-Guard)." }, { "name": "Models", "description": "SRS Section 6.1 official 21-model catalog & runtime alias resolver." }, { "name": "Document OCR & Intelligent Document Processing", "description": "Document analysis, invoice scanning, CCCD, Driver License, and Passport OCR." }, { "name": "Computer Vision & Biometric eKYC", "description": "1:1 Face matching and anti-spoofing liveness detection." }, { "name": "Natural Language Processing (Translation & Summarization)", "description": "Bilingual machine translation (Helsinki-NLP) and executive document summarization." }, { "name": "Jobs", "description": "Asynchronous heavy job status polling and cancellation." }, { "name": "User Portal & Console API", "description": "Developer console: Projects, Keys, Balance & Service subscriptions." }, { "name": "Authentication", "description": "User login, registration & token exchange." } ] }