ai

list aggregated AI token usage

Changed on
get/w/{workspace}/ai/usage

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/w/{workspace}/ai/usage
  • Auth: one of:
    • HTTP bearer
    • API key in cookie token

Path parameters

workspacestring required

Query parameters

daysinteger
group_by'day' | 'user' | 'model'
scope'workspace' | 'self'

workspace-wide usage (admin only) or the calling user's own

Response

usage buckets

truncatedboolean required

more buckets matched than were returned, so summing them under-reports

Changes