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

# Upload File

> Upload a file using true streaming without buffering to disk.



## OpenAPI

````yaml /openai-api-swagger.json post /v1/files
openapi: 3.1.0
info:
  title: impala.ai OpenAI API v0.1.0
  description: >-
    An OpenAI API compatible server for impala.ai


    All timestamps are Unix epoch seconds, UTC. A null `*_at` field means the
    event did not occur for this run.


    All costs in USD.
  version: 0.1.0
servers: []
security: []
paths:
  /v1/files:
    post:
      tags:
        - files
      summary: Upload File
      description: Upload a file using true streaming without buffering to disk.
      operationId: upload_file_v1_files_post
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
                - purpose
              properties:
                file:
                  type: string
                  format: binary
                  description: The File object (not file name) to be uploaded.
                purpose:
                  type: string
                  enum:
                    - assistants
                    - batch
                    - fine-tune
                    - vision
                    - user_data
                    - evals
                  description: The intended purpose of the uploaded file.
                expires_after:
                  type: object
                  description: >-
                    The expiration policy for a file. By default, files with
                    purpose=batch expire after 30 days and all other files are
                    persisted until they are manually deleted.
                  properties:
                    anchor:
                      type: string
                      enum:
                        - created_at
                      description: >-
                        Anchor timestamp after which the expiration policy
                        applies. Supported anchors: `created_at`.
                    seconds:
                      type: integer
                      minimum: 3600
                      maximum: 2592000
                      description: >-
                        The number of seconds after the anchor time that the
                        file will expire. Must be between 3600 (1 hour) and
                        2592000 (30 days).
                  required:
                    - anchor
                    - seconds
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileObjectModel'
components:
  schemas:
    FileObjectModel:
      properties:
        id:
          type: string
          title: Id
          description: The file identifier, which can be referenced in the API endpoints.
        object:
          type: string
          const: file
          title: Object
          description: The object type, which is always file.
        bytes:
          type: integer
          title: Bytes
          description: The size of the file, in bytes.
        created_at:
          type: integer
          title: Created At
          description: The Unix timestamp (in seconds) for when the file was created.
        expires_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Expires At
          description: The Unix timestamp (in seconds) for when the file will expire.
        filename:
          type: string
          title: Filename
          description: The name of the file.
        purpose:
          $ref: '#/components/schemas/FilePurpose'
          description: >-
            The intended purpose of the file. Supported values are `assistants`,
            `assistants_output`, `batch`, `batch_output`, `fine-tune`,
            `fine-tune-results`, `vision`, and `user_data`.
      type: object
      required:
        - id
        - object
        - bytes
        - created_at
        - expires_at
        - filename
        - purpose
      title: FileObjectModel
    FilePurpose:
      type: string
      enum:
        - assistants
        - assistants_output
        - batch
        - batch_output
        - fine-tune
        - fine-tune-results
        - vision
        - user_data
      title: FilePurpose

````