> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datris.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AI-powered question answering

> Use AI to answer a question based on provided context. Ideal for RAG workflows — retrieve relevant chunks via vector search, then pass them as context along with the user's question.



## OpenAPI

````yaml /openapi.yaml post /api/v1/ai/answer
openapi: 3.0.3
info:
  title: Datris API
  description: >
    REST API for the Datris AI Data Platform. Ingest, validate, transform,
    store, and retrieve data.


    For AI agent integration, use the [MCP
    Server](https://docs.datris.ai/mcp-server) instead.
  version: 1.11.3
  contact:
    name: Datris
    url: https://datris.ai
  license:
    name: Apache 2.0
servers:
  - url: http://localhost:8080
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/ai/answer:
    post:
      tags:
        - AI
      summary: AI-powered question answering
      description: >-
        Use AI to answer a question based on provided context. Ideal for RAG
        workflows — retrieve relevant chunks via vector search, then pass them
        as context along with the user's question.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiAnswerRequest'
      responses:
        '200':
          description: AI-generated answer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiAnswerResponse'
        '500':
          description: Error
components:
  schemas:
    AiAnswerRequest:
      type: object
      required:
        - query
        - context
      properties:
        query:
          type: string
          description: The question to answer
        context:
          type: string
          description: Context text to base the answer on (e.g., retrieved document chunks)
    AiAnswerResponse:
      type: object
      properties:
        answer:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Optional API key for authentication (enabled via application.yaml)

````