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

# Search memories using semantic similarity

> Performs semantic search over stored memories using cosine similarity. Returns memories ranked by relevance to the query. Optionally returns a summarized version of the memories.



## OpenAPI

````yaml https://app.recallio.ai/swagger/v1/swagger.json post /api/Memory/recall
openapi: 3.0.4
info:
  title: Recallio API
  description: API for Recallio.AI
  contact:
    name: Recallio.AI Team
    email: support@recallio.ai
  version: v1
servers:
  - url: https://app.recallio.ai
security:
  - Bearer: []
tags:
  - name: Knowledge
  - name: Memory
  - name: MemoryGraph (Extra Pack)
paths:
  /api/Memory/recall:
    post:
      tags:
        - Memory
      summary: Search memories using semantic similarity
      description: >-
        Performs semantic search over stored memories using cosine similarity.
        Returns memories ranked by relevance to the query. Optionally returns a
        summarized version of the memories.
      operationId: RecallMemory
      parameters:
        - name: summarized
          in: query
          description: >-
            If the return facts should be summarized (because of the delay, this
            is usually better to use 'recall-summary' endpoint if you expect a
            summary
          schema:
            type: boolean
            default: false
        - name: reRank
          in: query
          description: >-
            If the individual fact returns should be reranked via LLM. This is
            only usefull when the amount of valid return fact is larger than the
            limit
          schema:
            type: boolean
            default: false
        - name: type
          in: query
          description: >-
            To retrieve 'facts' (default) or 'raw' memories. Facts will return a
            better result
          schema:
            type: string
            default: facts
        - name: similarityThreshold
          in: query
          description: >-
            To control the similiraty treshold in the consine research. 0.3
            (default) allows a wider search, 0.7 would filter more. Range is
            between 0 (no similarity) and 1 (extremely similar)
          schema:
            type: number
            format: double
            default: 0.3
        - name: limit
          in: query
          description: Amount of facts to retrieve
          schema:
            type: integer
            format: int32
            default: 10
      requestBody:
        description: Search parameters including query, filters, and result limits
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemoryRecallRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/MemoryRecallRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/MemoryRecallRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MemoryWithScoreDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorReturnClass'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorReturnClass'
components:
  schemas:
    MemoryRecallRequest:
      required:
        - projectId
        - query
        - scope
        - userId
      type: object
      properties:
        tags:
          type: array
          items:
            type: string
          description: Optional tags to filter memories by
          nullable: true
          example:
            - preferences
            - ui
        userId:
          minLength: 1
          type: string
          description: User identifier to search memories for
          example: user_123
        projectId:
          minLength: 1
          type: string
          description: Project identifier to search memories within
          example: project_abc
        query:
          minLength: 1
          type: string
          description: >-
            Natural language query to search for similar memories. To retrieve
            all topics, use the '*' wildcard.
          example: What are the user's UI preferences?
        scope:
          minLength: 1
          type: string
          description: >-
            Search scope: 'user' (user-specific), 'project' (project-wide), or
            'team' (team-wide)
          example: user
      additionalProperties: false
    MemoryWithScoreDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the memory
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
        userId:
          type: string
          description: Identifier of the user who owns this memory
          nullable: true
          example: user_123
        projectId:
          type: string
          description: Project identifier this memory belongs to
          nullable: true
          example: project_abc
        content:
          type: string
          description: The stored content/text of the memory
          nullable: true
          example: >-
            The user prefers dark mode and wants notifications disabled on
            weekends
        tags:
          type: array
          items:
            type: string
          description: Tags associated with this memory for categorization
          nullable: true
          example:
            - preferences
            - ui
            - notifications
        metadata:
          description: Metadata associated with this memory
          nullable: true
          example:
            timestamp: '2025-08-02T14:30:00Z'
            category: user-preferences
            source: settings-page
        createdAt:
          type: string
          description: Timestamp when the memory was created
          format: date-time
          nullable: true
          example: '2024-01-15T10:30:00Z'
        expiresAt:
          type: string
          description: Optional expiration timestamp for the memory
          format: date-time
          nullable: true
          example: '2024-12-31T23:59:59Z'
        categories:
          type: array
          items:
            type: string
          description: Categories associated with this memory
          nullable: true
          example:
            - preferences
            - ui
            - notifications
        similarityScore:
          type: number
          description: >-
            Cosine similarity score between the query and this memory (0.0 to
            1.0). Higher values indicate better matches
          format: double
          example: 0.85
        similarityLevel:
          type: string
          description: >-
            Human-readable interpretation of the similarity score (Excellent,
            Very Good, Good, Fair, Moderate, Low)
          nullable: true
          readOnly: true
          example: Very Good
      additionalProperties: false
    ErrorReturnClass:
      required:
        - error
      type: object
      properties:
        error:
          minLength: 1
          type: string
          description: Error message indicating the specific validation issue
          example: '"Invalid scope type. Must be ''user'', ''project'', or ''team''."'
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````