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

# Add file to the AI store

Uploads one or more files to the AI store. Supports PDF, DOC, DOCX, and TXT formats. Files must be base64 encoded and cannot exceed the organization's vector store size limit. All files are processed asynchronously.


## OpenAPI

````yaml https://api.getfernand.com/openapi.json post /organization/rag/sources/files
openapi: 3.0.3
info:
  title: Fernand API Documentation
  version: '3.0'
  description: This is the documentation for the [Fernand](https://getfernand.com) API.
  termsOfService: https://getfernand.com/terms
  contact:
    name: Fernand Support
    url: https://getfernand.com
    email: support@getfernand.com
  x-logo:
    url: https://app.getfernand.com/images/favicon/icon_128.png
servers:
  - url: https://api.getfernand.com
    description: ''
    x-last-modified: 1764750693905
security:
  - apiKeyHeader: []
externalDocs:
  description: You can access our documentation online by visiting https://api.fernand.help
  url: https://api.fernand.help
paths:
  /organization/rag/sources/files:
    post:
      tags:
        - RAG (AI data)
      summary: Add file to the AI store
      description: >-
        Uploads one or more files to the AI store. Supports PDF, DOC, DOCX, and
        TXT formats. Files must be base64 encoded and cannot exceed the
        organization's vector store size limit. All files are processed
        asynchronously.
      operationId: addAIFileSources
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                files:
                  type: array
                  description: Array of files to upload (max 10MB per file).
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        description: File name with extension.
                        example: documentation.pdf
                      type:
                        type: string
                        enum:
                          - application/pdf
                          - application/msword
                          - >-
                            application/vnd.openxmlformats-officedocument.wordprocessingml.document
                          - text/plain
                        description: MIME type of the file.
                        example: application/pdf
                      content:
                        type: string
                        format: byte
                        description: Base64 encoded file content.
                        example: JVBERi0xLjQKJeLjz9MK...
                    required:
                      - name
                      - type
                      - content
              required:
                - files
      responses:
        '202':
          description: Files queued for processing.
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid file format or size limit exceeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Maximum size of the vector store exceeded.
components:
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      description: >-
        Authenticate your account by including your secret key in API requests.

        You can manage your API keys in the
        [Dashboard](https://app.getfernand.com/).


        Authentication to the API is performed by using the HTTP Header
        X-API-Key.
      name: X-API-Key
      in: header
      x-last-modified: 1764750344730

````