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

# Upload File

> Upload a file to user's S3 bucket.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/external/storage/upload
openapi: 3.1.0
info:
  title: Lyceum Cloud Execution API
  version: 0.1.0
servers: []
security: []
paths:
  /api/v2/external/storage/upload:
    post:
      tags:
        - Storage Files
      summary: Upload File
      description: Upload a file to user's S3 bucket.
      operationId: upload_file_api_v2_external_storage_upload_post
      parameters:
        - name: key
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Key
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_file_api_v2_external_storage_upload_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_upload_file_api_v2_external_storage_upload_post:
      properties:
        file:
          type: string
          contentMediaType: application/octet-stream
          title: File
      type: object
      required:
        - file
      title: Body_upload_file_api_v2_external_storage_upload_post
    UploadResponse:
      properties:
        key:
          type: string
          title: Key
        size:
          type: integer
          title: Size
        etag:
          type: string
          title: Etag
        message:
          type: string
          title: Message
      type: object
      required:
        - key
        - size
        - etag
        - message
      title: UploadResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````