openapi: 3.1.0 info: title: KAITO RAGEngine REST Chat API description: REST API for the KAITO RAGEngine, used to manage indexes, ingest and retrieve documents, persist or reload indexes from storage, and run OpenAI-compatible chat completions grounded in indexed content. The API is exposed by a self-hosted RAGEngine service running in a Kubernetes cluster. version: 1.0.0 contact: name: KAITO Project url: https://kaito-project.github.io/kaito/ license: name: MIT url: https://github.com/kaito-project/kaito/blob/main/LICENSE servers: - url: http://localhost:8080 description: Self-hosted KAITO RAGEngine endpoint (replace with the in-cluster service URL). tags: - name: Chat description: OpenAI-compatible chat completions grounded in RAG indexes. paths: /v1/chat/completions: post: operationId: chatCompletions summary: RAG-grounded chat completions description: OpenAI-compatible chat completion endpoint that grounds responses in the specified RAG index. tags: - Chat requestBody: required: true content: application/json: schema: type: object properties: index_name: type: string model: type: string messages: type: array items: type: object temperature: type: number max_tokens: type: integer context_token_ratio: type: number required: - messages responses: '200': description: Chat completion result. content: application/json: schema: type: object