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

# Retrieve API usage and rate limit info

> Returns rate limit status and usage information for the current API key. For OAuth authentication, returns a brief message indicating that detailed usage tracking is only available for API key authentication. Requires read scope.




## OpenAPI

````yaml /openapi.yaml get /api/v1/usage
openapi: 3.0.3
info:
  title: Sure API
  version: v1
  description: OpenAPI documentation generated from executable request specs.
servers:
  - url: https://app.sure.am
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
paths:
  /api/v1/usage:
    get:
      tags:
        - Usage
      summary: Retrieve API usage and rate limit info
      description: >
        Returns rate limit status and usage information for the current API key.
        For OAuth authentication, returns a brief message indicating that
        detailed usage tracking is only available for API key authentication.
        Requires read scope.
      responses:
        '200':
          description: usage information returned
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    description: Response when authenticated with an API key
                    required:
                      - api_key
                      - rate_limit
                    properties:
                      api_key:
                        type: object
                        required:
                          - name
                          - scopes
                          - created_at
                        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
                        required:
                          - tier
                          - limit
                          - current_count
                          - remaining
                          - reset_in_seconds
                          - reset_at
                        properties:
                          tier:
                            type: string
                            enum:
                              - standard
                              - premium
                              - enterprise
                          limit:
                            type: integer
                            description: Maximum requests allowed per hour
                          current_count:
                            type: integer
                            description: Requests made in the current hour window
                          remaining:
                            type: integer
                            description: Requests remaining in the current window
                          reset_in_seconds:
                            type: integer
                            description: Seconds until the rate limit window resets
                          reset_at:
                            type: string
                            format: date-time
                            description: Timestamp when the rate limit window resets
                  - type: object
                    description: Response when authenticated with OAuth
                    required:
                      - authentication_method
                      - message
                    properties:
                      authentication_method:
                        type: string
                        example: oauth
                      message:
                        type: string
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: insufficient scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        message:
          type: string
          nullable: true
        details:
          oneOf:
            - type: array
              items:
                type: string
            - type: object
          nullable: true
        errors:
          type: array
          items:
            type: string
          nullable: true
          description: >-
            Validation error messages (alternative to details used by trades,
            valuations, etc.)
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: X-Api-Key
      in: header
      description: API key for authentication. Generate one from your account settings.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        OAuth2 Bearer token. Obtain a token from the /api/v1/auth/login or
        /api/v1/auth/refresh endpoints. The token must have the 'read' or
        'read_write' scope.

````