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

# Search within a multi knowledge bases



## OpenAPI

````yaml https://blackbox.dasha.ai/swagger/v1/swagger.json post /api/v1/rag/search
openapi: 3.0.4
info:
  title: Dasha BlackBox Agent API
  description: API for managing AI agents and calls
  contact:
    name: DashaAI Team
    email: support@dasha.ai
  version: v1
servers:
  - url: https://blackbox.dasha.ai
    description: Dasha BlackBox Agent API
security:
  - ApiKey: []
  - OAuth: []
tags:
  - name: ActivityLogs
  - name: Agents
  - name: AgentTestCases
  - name: CallResults
  - name: Calls
  - name: Chats
  - name: Copilot
  - name: CustomerData
  - name: Mcp
  - name: Media
  - name: Misc
  - name: PronunciationDictionaries
  - name: Providers
  - name: SipAliases
  - name: SipCredentials
  - name: SipPhoneNumbers
  - name: TextChat
  - name: TwilioProvider
  - name: Voice
  - name: WebhookTest
  - name: WebIntegrations
  - name: WebSocket
    description: WebSocket endpoints for real-time communication
paths:
  /api/v1/rag/search:
    post:
      tags:
        - Search
      summary: Search within a multi knowledge bases
      requestBody:
        description: Single KB search request
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/RetrievalRequest'
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/RetrievalRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/RetrievalRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/RetrievalRequest'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/RetrievalResult'
            application/json:
              schema:
                $ref: '#/components/schemas/RetrievalResult'
            text/json:
              schema:
                $ref: '#/components/schemas/RetrievalResult'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema: {}
            application/json:
              schema: {}
            text/json:
              schema: {}
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema: {}
            application/json:
              schema: {}
            text/json:
              schema: {}
components:
  schemas:
    RetrievalRequest:
      type: object
      properties:
        query:
          type: string
          nullable: true
        knowledgeBaseNames:
          type: array
          items:
            type: string
          nullable: true
        maxResults:
          type: integer
          format: int32
        minScore:
          type: number
          format: float
        reranker:
          type: string
          nullable: true
      additionalProperties: false
    RetrievalResult:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/RetrievalResultItem'
          nullable: true
        totalResults:
          type: integer
          format: int32
        processingTime:
          allOf:
            - $ref: '#/components/schemas/ProcessingTimeBreakdown'
          nullable: true
      additionalProperties: false
    RetrievalResultItem:
      type: object
      properties:
        chunkId:
          type: string
          format: uuid
        documentId:
          type: string
          format: uuid
        content:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        score:
          type: number
          format: float
      additionalProperties: false
    ProcessingTimeBreakdown:
      type: object
      properties:
        total:
          type: string
          format: date-span
        embeddingTime:
          type: string
          format: date-span
        searchTime:
          type: string
          format: date-span
        rerankingTime:
          type: string
          format: date-span
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: http
      description: API Key Authentication (Bearer {key})
      scheme: Bearer
    OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://auth.dasha.ai/connect/authorize
          scopes:
            platform_api: Platform API

````