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

# Search for similar chunks

> Search chunked documents using the configured embedding service. Restrict document_uuids when you need a specific corpus. Full-document storage and vector-search availability are separate concerns.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/knowledge-base/search
openapi: 3.1.0
info:
  title: Athena API
  version: 1.0.0
  description: >-
    Hosted Athena customer API. Authenticate backend management and call-trigger
    requests with X-API-Key. Website embeds and artifact playback use their own
    scoped tokens. Provider availability, feature settings, and verification
    limits are described in the guides.
servers:
  - url: https://athena.tryopencomputer.com
    description: Hosted Athena API
security: []
paths:
  /api/v1/knowledge-base/search:
    post:
      tags:
        - Knowledge Base
      summary: Search for similar chunks
      description: >-
        Search chunked documents using the configured embedding service.
        Restrict document_uuids when you need a specific corpus. Full-document
        storage and vector-search availability are separate concerns.
      operationId: search_chunks_api_v1_knowledge_base_search_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChunkSearchRequestSchema'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChunkSearchResponseSchema'
        '401':
          description: Authentication is missing or invalid.
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    ChunkSearchRequestSchema:
      properties:
        query:
          type: string
          title: Query
          description: Search query text
        limit:
          type: integer
          maximum: 50
          minimum: 1
          title: Limit
          description: Maximum number of results
          default: 5
        document_uuids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Document Uuids
          description: Filter by specific document UUIDs
        min_similarity:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Min Similarity
          description: Minimum similarity threshold
      type: object
      required:
        - query
      title: ChunkSearchRequestSchema
      description: Request schema for searching similar chunks.
    ChunkSearchResponseSchema:
      properties:
        chunks:
          items:
            $ref: '#/components/schemas/ChunkResponseSchema'
          type: array
          title: Chunks
        query:
          type: string
          title: Query
        total_results:
          type: integer
          title: Total Results
      type: object
      required:
        - chunks
        - query
        - total_results
      title: ChunkSearchResponseSchema
      description: Response schema for chunk search results.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ChunkResponseSchema:
      properties:
        id:
          type: integer
          title: Id
        document_id:
          type: integer
          title: Document Id
        chunk_text:
          type: string
          title: Chunk Text
        contextualized_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Contextualized Text
        chunk_index:
          type: integer
          title: Chunk Index
        chunk_metadata:
          additionalProperties: true
          type: object
          title: Chunk Metadata
        filename:
          type: string
          title: Filename
        document_uuid:
          type: string
          title: Document Uuid
        similarity:
          type: number
          title: Similarity
      type: object
      required:
        - id
        - document_id
        - chunk_text
        - contextualized_text
        - chunk_index
        - chunk_metadata
        - filename
        - document_uuid
        - similarity
      title: ChunkResponseSchema
      description: Response schema for a document chunk.
    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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.