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

# /v1/usage

> Get current month's usage statistics for the authenticated API key.



## OpenAPI

````yaml GET /v1/usage
openapi: 3.1.0
info:
  title: Compresto Image Compression API
  description: >-
    High-performance image compression API with support for JPEG, PNG, and WebP
    formats.
  version: 1.0.0
  contact:
    email: support@compresto.app
servers:
  - url: https://api.compresto.app
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Health
    description: API health check
  - name: Compression
    description: Image compression endpoints
  - name: Usage
    description: Usage statistics
paths:
  /v1/usage:
    get:
      tags:
        - Usage
      summary: Get usage statistics
      description: Get current month's usage statistics for the authenticated API key.
      operationId: getUsage
      responses:
        '200':
          description: Usage statistics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageResponse'
        '401':
          description: Unauthorized - missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UsageResponse:
      type: object
      properties:
        plan:
          type: string
          enum:
            - free
            - pro
            - business
          description: Current subscription tier
        usage:
          type: object
          properties:
            current:
              type: integer
              description: Number of requests this month
            limit:
              type: integer
              description: Monthly request limit
            resetAt:
              type: string
              format: date-time
              description: When the monthly quota resets
          required:
            - current
            - limit
            - resetAt
        totals:
          type: object
          properties:
            bytesIn:
              type: integer
              description: Total bytes uploaded this month
            bytesOut:
              type: integer
              description: Total bytes returned this month
            savedBytes:
              type: integer
              description: Total bytes saved (bytesIn - bytesOut)
            savedPercent:
              type: integer
              description: Overall savings percentage
          required:
            - bytesIn
            - bytesOut
            - savedBytes
            - savedPercent
      required:
        - plan
        - usage
        - totals
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error code
        message:
          type: string
          description: Human-readable error message
      required:
        - error
        - message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Get your key at
        https://compresto.app/dashboard

````