> ## Documentation Index
> Fetch the complete documentation index at: https://sure-917046f5-docs-cloudflare-tunnel-self-hosting.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get API usage

> Returns API key details and rate limit information. Detailed usage is only available when authenticating with an API key.



## OpenAPI

````yaml /openapi.yaml get /api/v1/usage
openapi: 3.0.3
info:
  title: Sure API
  version: v1
  description: OpenAPI documentation for the Sure API.
servers:
  - url: https://app.sure.am
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
paths:
  /api/v1/usage:
    get:
      tags:
        - Usage
      summary: Get API usage
      description: >-
        Returns API key details and rate limit information. Detailed usage is
        only available when authenticating with an API key.
      responses:
        '200':
          description: usage information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageResponse'
      security:
        - apiKeyAuth: []
components:
  schemas:
    UsageResponse:
      type: object
      properties:
        api_key:
          type: object
          properties:
            name:
              type: string
            scopes:
              type: array
              items:
                type: string
            last_used_at:
              type: string
              format: date-time
              nullable: true
            created_at:
              type: string
              format: date-time
        rate_limit:
          type: object
          properties:
            tier:
              type: string
            limit:
              type: integer
            current_count:
              type: integer
            remaining:
              type: integer
            reset_in_seconds:
              type: integer
            reset_at:
              type: string
              format: date-time
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: X-Api-Key
      in: header
      description: API key for authentication. Generate one from your account settings.

````