v2
chat
chat

Get Copilot Usage

Changed on

Get CoPilot usage status for the authenticated user.

Returns the percentage of the daily/weekly allowance used — not the raw spend or cap — so clients cannot derive per-turn cost or platform margins. Global defaults sourced from LaunchDarkly (falling back to config). Includes the user's rate-limit tier.

get/api/chat/usage

Request

  • The document declares no server URL.
  • Auth
    HTTP bearer

Response

Successful Response

tier'NO_TIER' | 'TRIAL' | 'BASIC' | 'PRO' | 'MAX' | 'BUSINESS' | 'ENTERPRISE'

Subscription tiers with increasing cost allowances.

Mirrors the SubscriptionTier enum in schema.prisma. Once prisma generate is run, this can be replaced with::

from prisma.enums import SubscriptionTier
reset_costinteger

Credit cost (in cents) to reset the daily limit. 0 = feature disabled.

state'ok' | 'low' | 'exhausted'

'exhausted' when a turn can't start now (a capped window or the trial allowance is used up), 'low' from 80% of the tightest window (where the meters turn amber), otherwise 'ok'.

limiting_window'daily' | 'weekly' | 'trial' nullable

The limit behind a 'low' or 'exhausted' state: the used-up window that refills last, 'trial' for the trial allowance, or the fullest window when 'low'. Null when 'ok'.

resets_atstring date-time nullable

When the limiting window refills. Null when 'ok', for the trial allowance, and for a window that allows nothing (no plan), none of which refill.

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • warning

      added the new TRIAL enum value to the response property for the response status