> ## 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.

# Fetch Media

> Get an asset by ID, applying optional transforms on the fly via query parameters.



## OpenAPI

````yaml GET /api/v1/fetch/{mediaId}
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/fetch/{mediaId}:
    get:
      tags:
        - Media
      summary: Fetch Media
      description: >-
        Get an asset by ID, applying optional transforms on the fly via query
        parameters.
      parameters:
        - name: mediaId
          in: path
          required: true
          schema:
            type: string
          example: med_123456789
        - name: transforms
          in: query
          description: >-
            JSON encoded string or preset ID to apply transforms before
            fetching.
          schema:
            type: string
          example: '{"width": 800, "height": 600, "crop": "fill"}'
      responses:
        '200':
          description: Media binary content
          content:
            image/*:
              schema:
                type: string
                format: binary
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
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'
    NotFound:
      description: Not Found
      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

````