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

# Connect Database to RAG Endpoint



## OpenAPI

````yaml post /v3/semantic_model/connect_database/{rag_config_id}/{database_id}
openapi: 3.0.3
info:
  title: Connect Database to RAG
  version: 1.0.0
servers:
  - url: https://agent-prod.studio.lyzr.ai
security:
  - ApiKeyAuth: []
paths:
  /v3/semantic_model/connect_database/{rag_config_id}/{database_id}:
    post:
      summary: Connect Database to RAG Endpoint
      parameters:
        - in: path
          name: rag_config_id
          required: true
          schema:
            type: string
        - in: path
          name: database_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Database connected
          content:
            application/json:
              schema:
                type: object
                properties:
                  connected_database_id:
                    type: string
        '500':
          description: Internal Server Error
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````