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

# Upload File

> Upload a file and store it in the configured storage backend.

This endpoint provides the simplest method for uploading files up to a
service-defined limit (e.g., 100 MB).



## OpenAPI

````yaml https://dex.sgp.scale.com/openapi.json post /v1/projects/{project_id}/files
openapi: 3.1.0
info:
  title: Document Understanding API
  description: API for uploading and processing documents
  version: 0.4.5
servers: []
security:
  - ApiKey: []
    AccountId: []
tags:
  - name: Projects
    description: Operations related to project creation and management
  - name: Files
    description: Operations related to file upload and access
  - name: Parse
    description: Operations related to starting parse jobs and accessing their results
  - name: Vector Stores
    description: Operations related to vector store creation and management
  - name: Extract
    description: Operations related to starting extract jobs and accessing their results
  - name: Research
    description: Dex Research agent kickoff and results.
  - name: Jobs
    description: Operations related to monitoring jobs and their status
paths:
  /v1/projects/{project_id}/files:
    post:
      tags:
        - Files
      summary: Upload File
      description: |-
        Upload a file and store it in the configured storage backend.

        This endpoint provides the simplest method for uploading files up to a
        service-defined limit (e.g., 100 MB).
      operationId: upload_file_v1_projects__project_id__files_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_file_v1_projects__project_id__files_post
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileEntity'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_upload_file_v1_projects__project_id__files_post:
      properties:
        file:
          type: string
          title: File
          format: binary
      type: object
      required:
        - file
      title: Body_upload_file_v1_projects__project_id__files_post
    FileEntity:
      properties:
        id:
          type: string
          title: Id
          description: ID of the entity
        project_id:
          type: string
          title: Project Id
          description: ID of the project
        object:
          anyOf:
            - type: string
              const: file
            - type: 'null'
          title: Object
          default: file
        filename:
          type: string
          title: Filename
        size_bytes:
          type: integer
          title: Size Bytes
        mime_type:
          type: string
          title: Mime Type
        status:
          $ref: '#/components/schemas/FileStatus'
        created_at:
          type: string
          format: date-time
          title: Created At
        storage_key:
          type: string
          title: Storage Key
      type: object
      required:
        - id
        - project_id
        - filename
        - size_bytes
        - mime_type
        - status
        - created_at
        - storage_key
      title: FileEntity
      description: >-
        Represents a file in the Document Understanding Core.

        Based on
        https://docs.google.com/document/d/1nB0SqUGTuIBiNMzLVfLW5NWSEZrcgEaXtzRessQgAPo/edit?tab=t.0#bookmark=id.ne9tup4c49z5
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FileStatus:
      type: string
      enum:
        - uploading
        - uploaded
        - failed
        - deleted
      title: FileStatus
    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:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication
    AccountId:
      type: apiKey
      in: header
      name: x-selected-account-id
      description: Selected Account ID

````