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

# Retrieve Knowledge File

> Retrieve knowledge file by ID.



## OpenAPI

````yaml /openapi.json get /v1/knowledge-files/{id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.bey.dev
security: []
paths:
  /v1/knowledge-files/{id}:
    get:
      tags:
        - Knowledge Files
      summary: Retrieve Knowledge File
      description: Retrieve knowledge file by ID.
      operationId: get_knowledge_file_v1_knowledge_files__id__get
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: Knowledge File ID.
            title: Id
          description: Knowledge File ID.
      responses:
        '200':
          description: Requested Knowledge File
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeFileResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    KnowledgeFileResponse:
      oneOf:
        - $ref: '#/components/schemas/ToUploadKnowledgeFileResponse'
        - $ref: '#/components/schemas/AvailableKnowledgeFileResponse'
      discriminator:
        propertyName: status
        mapping:
          available:
            $ref: '#/components/schemas/AvailableKnowledgeFileResponse'
          to-upload:
            $ref: '#/components/schemas/ToUploadKnowledgeFileResponse'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ToUploadKnowledgeFileResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the object in the database.
          examples:
            - 01234567-89ab-cdef-0123-456789abcdef
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
          examples:
            - Hitchhiker's Guide to the Galaxy
        format:
          $ref: '#/components/schemas/KnowledgeFileFormat'
        status:
          type: string
          const: to-upload
          title: Status
          default: to-upload
      type: object
      required:
        - id
        - name
        - format
      title: ToUploadKnowledgeFileResponse
      description: Response model for a knowledge file that is to be uploaded.
    AvailableKnowledgeFileResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the object in the database.
          examples:
            - 01234567-89ab-cdef-0123-456789abcdef
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
          examples:
            - Hitchhiker's Guide to the Galaxy
        format:
          $ref: '#/components/schemas/KnowledgeFileFormat'
        status:
          type: string
          const: available
          title: Status
          default: available
        text:
          type: string
          title: Text
      type: object
      required:
        - id
        - name
        - format
        - text
      title: AvailableKnowledgeFileResponse
      description: Response model for an available knowledge file.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    KnowledgeFileFormat:
      type: string
      enum:
        - text
        - pdf
      title: KnowledgeFileFormat
      description: Format of the knowledge file.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: Your Beyond Presence API Key.
      in: header
      name: x-api-key

````