Skip to navigation

Get workspace token usage

Beta

Aggregate LLM token usage (and cost) for one workspace over the last days days: workspace totals plus per-member, per-day and per-Computer breakdowns. Token counters are summed from each session’s usage ledger; dry-run (test) sessions are reported separately and excluded from the totals. Requires workspace owner or manager (or Athena admin) permissions — the same gate as the in-app Usage page.

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

workspace_idstringRequired

Headers

X-Athena-Session-CredentialstringOptional

Query parameters

daysintegerOptional1-365Defaults to 30

Reporting window in days, ending now (1-365)

Response

Workspace usage retrieved successfully
active_usersinteger
Users with at least one session
computer_cost_usddouble

Portion of total_cost_usd produced by Computers

computer_sessionsinteger
Number of Computer usage sessions
computer_tokensobject

Portion of tokens produced by Computers’ LLM usage (already included in tokens, never additive)

dailylist of objects

Per-day breakdown, oldest first

daysinteger
Length of the reporting window in days
dry_run_cost_usddouble

Cost of dry-run (test) sessions

dry_run_sessionsinteger

Number of dry-run (test) sessions

dry_run_tokensobject

Token counters from dry-run (test) sessions, excluded from tokens

per_computerlist of objects

Per-Computer breakdown, highest cost first

per_userlist of objects

Per-member breakdown, highest cost first

tokensobject

Token counters across the workspace’s sessions in the window, excluding dry-run (test) sessions

total_cost_usddouble
Total LLM cost in USD
total_sessionsinteger
Number of sessions in the window
workspace_idstring
The workspace ID

Errors

403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error