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

# Upload Media

> Upload a media file. You can optionally apply initial transforms by passing a JSON string in the `transform` field.

**Supported File Types**: - **Images**: JPEG, PNG, WEBP, GIF, SVG, AVIF, TIFF - **Videos**: MP4, WEBM, MOV, AVI - **Documents**: PDF - **Audio**: MP3, WAV, OGG, AAC
**Max File Size**: 100MB




## OpenAPI

````yaml POST /api/v1/upload
openapi: 3.0.0
info:
  title: Dreep API
  description: The universal media processing and storage API.
  version: 1.0.0
servers:
  - url: https://api.dreep.cloud
security:
  - ApiKeyAuth: []
paths:
  /api/v1/upload:
    post:
      tags:
        - Upload
      summary: Upload Media
      description: >
        Upload a media file. You can optionally apply initial transforms by
        passing a JSON string in the `transform` field.


        **Supported File Types**: - **Images**: JPEG, PNG, WEBP, GIF, SVG, AVIF,
        TIFF - **Videos**: MP4, WEBM, MOV, AVI - **Documents**: PDF - **Audio**:
        MP3, WAV, OGG, AAC

        **Max File Size**: 100MB
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The media file to upload.
                folderId:
                  type: string
                  description: The ID of the folder to upload the file into. **Required.**
                  example: fol_987654321
                transform:
                  type: string
                  description: >-
                    JSON string representing initial transforms to apply (e.g.
                    `{"width": 1200, "format": "webp"}`).
              required:
                - file
                - folderId
      responses:
        '200':
          description: Media uploaded successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: med_123456789
                  url:
                    type: string
                    example: https://cdn.dreep.cloud/med_123456789/hero.jpg
                  size:
                    type: integer
                    example: 245000
                  format:
                    type: string
                    example: jpeg
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: Invalid request parameters
        code:
          type: string
          example: invalid_request
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````