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

# Get Usage & Billing Limits

> Returns your current billing cycle usage for storage, folders, presets, and transformations.

## Understanding Your Limits

Every API request or dashboard action that interacts with your project's storage or transformation engine increments your billing counters.

Dreep's architecture restricts operations when you exceed your billing plan. If you attempt to upload a file when your storage is full, or transform an image when you've hit your monthly transformation cap, the API will reject the request with a `402 Payment Required` status code.

### The Counters

When you call this endpoint, you will receive the `limits` and `counters` objects which contain:

1. **Storage Bytes**: The total raw binary size of all assets stored in your project (in bytes). This is persistent.
2. **Transformations Monthly**: The number of image transformations triggered this month. Resets on the 1st of every month.
3. **Video Transformations Monthly**: The number of video transformations triggered this month. Resets on the 1st of every month. Video transformations count separately from image transformations because they are heavily CPU-intensive.
4. **Folders**: Total number of folders created.
5. **Presets**: Total number of transformation presets created.

### 402 Payment Required Error

If you hit an API endpoint that would exceed one of your limits, the response will look like this:

```json theme={null}
{
  "error": "Billing limit reached",
  "details": "You have exceeded your plan's storage_bytes limit."
}
```

To resolve this, you must either delete assets/folders to free up space, or upgrade your plan in the Dreep Dashboard.


## OpenAPI

````yaml GET /api/v1/usage
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
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/v1/usage:
    get:
      tags:
        - Usage & Billing
      summary: Get Usage Limits
      description: >-
        Returns your current billing cycle usage for storage, folders, presets,
        and transformations.
      responses:
        '200':
          description: Usage retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  storageBytes:
                    type: integer
                    description: >
                      Total bytes stored. Serialised as a string because the
                      underlying column is a BIGINT.
                    example: 170461024
                  imageCount:
                    type: integer
                    example: 109
                  fileCount:
                    type: integer
                    example: 19
                  folderCount:
                    type: integer
                    example: 11
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Unauthorized
      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: http
      scheme: bearer

````