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

# Get provider-side plan quota

> Live usage per AI provider, read from each provider's own official usage endpoint where one exists: Z.ai's monitor endpoint (the credit windows the plan enforces — the rolling 5-hour session window, monthly and weekly limits), Anthropic's Admin-API usage report for today so far with the full input/output/cached token split (needs an admin API key; a standard workspace key reads key-not-supported), and OpenRouter's per-key usage when the openai-compatible base URL is the OpenRouter gateway. Providers without a per-user usage API report unavailable with a reason — no usage figure is ever fabricated; the Budget page's charts still show the usage events recorded from model calls.



## OpenAPI

````yaml /api/openapi.json get /api/budget/provider-quota
openapi: 3.1.0
info:
  title: Aquila API
  version: 1.0.0
  description: >-
    Event-driven reconnaissance platform API. All /api/* routes except
    /api/public/* require an authenticated session (cookie), an X-Api-Key
    header, or a bearer token. Auth endpoints under /api/auth/* are generated by
    Better Auth.
servers:
  - url: https://aquila.attaxr.com
  - url: http://localhost
security: []
tags:
  - name: AI
  - name: Agents
  - name: Bulk Delete
  - name: Chat
  - name: Constraints
  - name: Dashboard
  - name: Events
  - name: JS
  - name: JS Analysis
  - name: JS Monitoring
  - name: Leads
  - name: MCP Key
  - name: Notification Channels
  - name: Notification Event Preferences
  - name: Notifications
  - name: OOB
  - name: Provider Keys
  - name: Public Shares
  - name: Reinforcements
  - name: Reports
  - name: Scans
  - name: Schedules
  - name: Shares
  - name: Tools
  - name: User Profiles
  - name: V1
  - name: Vulnerabilities
  - name: Workflows
  - name: Workspace
paths:
  /api/budget/provider-quota:
    get:
      tags:
        - Budget
      summary: Get provider-side plan quota
      description: >-
        Live usage per AI provider, read from each provider's own official usage
        endpoint where one exists: Z.ai's monitor endpoint (the credit windows
        the plan enforces — the rolling 5-hour session window, monthly and
        weekly limits), Anthropic's Admin-API usage report for today so far with
        the full input/output/cached token split (needs an admin API key; a
        standard workspace key reads key-not-supported), and OpenRouter's
        per-key usage when the openai-compatible base URL is the OpenRouter
        gateway. Providers without a per-user usage API report unavailable with
        a reason — no usage figure is ever fabricated; the Budget page's charts
        still show the usage events recorded from model calls.
      operationId: getApiBudgetProviderQuota
      responses:
        '200':
          description: >-
            One snapshot per supported provider — usage windows or the reason
            none are available.
          content:
            application/json:
              schema: {}
        '401':
          description: No valid session cookie or API key.
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: The aggregation failed.
          content:
            application/json:
              schema: {}
      security:
        - apiKeyCookie: []
        - apiKeyHeader: []
        - bearerAuth: []
components:
  securitySchemes:
    apiKeyCookie:
      type: apiKey
      in: cookie
      name: better-auth.session_token
      description: Browser session cookie set by Better Auth sign-in.
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: Personal API key (aquila_… prefix; settings → API keys).
    bearerAuth:
      type: http
      scheme: bearer
      description: Personal API key sent as a bearer token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.