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

# Get presigned URL for direct S3 upload



## OpenAPI

````yaml /openapi-components.json post /api/v1/materials/upload/presigned-url
openapi: 3.0.0
info:
  title: StudyFetch API
  description: API documentation for StudyFetch
  version: '1.0'
  contact: {}
servers:
  - url: https://studyfetchapi.com
    description: Production API Server
security: []
tags: []
paths:
  /api/v1/materials/upload/presigned-url:
    post:
      tags:
        - Materials
      summary: Get presigned URL for direct S3 upload
      operationId: getPresignedUploadUrl
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetPresignedUploadUrlDto'
      responses:
        '200':
          description: Presigned URL generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresignedUploadUrlResponseDto'
        '400':
          description: Invalid parameters
        '403':
          description: Insufficient permissions
      security:
        - x-api-key: []
components:
  schemas:
    GetPresignedUploadUrlDto:
      type: object
      properties:
        filename:
          type: string
          example: document.pdf
          description: Filename to upload
        contentType:
          type: string
          example: application/pdf
          description: MIME type of the file
        name:
          type: string
          example: Chapter 1 Notes
          description: Display name for the material
        folderId:
          type: string
          description: Folder ID to place the material in
        extractImages:
          type: boolean
          description: Whether to extract images from files
          example: true
          default: true
        references:
          description: References that this material cites
          type: array
          items:
            $ref: '#/components/schemas/ReferenceDto'
      required:
        - filename
        - contentType
        - name
    PresignedUploadUrlResponseDto:
      type: object
      properties:
        uploadUrl:
          type: string
          description: Presigned URL for direct S3 upload
        s3Key:
          type: string
          description: S3 key for the file
        materialId:
          type: string
          description: Material ID to use for completion
      required:
        - uploadUrl
        - s3Key
        - materialId
    ReferenceDto:
      type: object
      properties:
        title:
          type: string
          example: Understanding Photosynthesis
          description: Reference title
        url:
          type: string
          example: https://example.com/article
          description: Reference URL
      required:
        - title
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API Key for server-to-server authentication. Resolves to the owning
        organization.

````