Organization Usage Summary
Aggregate spend, tokens and request volume for the caller's organization.
The tenant-scoped counterpart of GET /v1/usage/summary, running the same aggregation over a narrower row set: the same bounded window, the same breakdowns, the same dimensions selector for paying only for the passes a caller reads. The breakdown by user names the people inside the caller's own scope, which is the roster they can already read.
Query parameters
Return logs with timestamp >= start_date (ISO 8601 or Unix epoch seconds)
Return logs with timestamp >= start_date (ISO 8601 or Unix epoch seconds)
Return logs with timestamp < end_date (ISO 8601 or Unix epoch seconds)
Return logs with timestamp < end_date (ISO 8601 or Unix epoch seconds)
Filter to one or more users; repeatable (user_id=a&user_id=b). Several values match any of them. At most 50 per call.
Filter to one or more users; repeatable (user_id=a&user_id=b). Several values match any of them. At most 50 per call.
Filter to a single status: 'success', 'error', or 'absorbed' (an attempt a routing policy recovered from, excluded from error_count and request_count)
Filter to a single status: 'success', 'error', or 'absorbed' (an attempt a routing policy recovered from, excluded from error_count and request_count)
Filter to a single failure status code (e.g. 429 for provider rate limits, 402 for missing-pricing rejections). Only error rows carry one, so this filter also restricts to status='error' unless 'status' is given explicitly
Filter to a single failure status code (e.g. 429 for provider rate limits, 402 for missing-pricing rejections). Only error rows carry one, so this filter also restricts to status='error' unless 'status' is given explicitly
Filter to one or more models; repeatable (model=a&model=b). Several values match any of them. At most 50 per call.
Filter to one or more models; repeatable (model=a&model=b). Several values match any of them. At most 50 per call.
Filter to a single endpoint (e.g. '/v1/chat/completions')
Filter to a single endpoint (e.g. '/v1/chat/completions')
Filter to a single provider (e.g. 'openai')
Filter to a single provider (e.g. 'openai')
Filter to a single provenance source (e.g. 'gateway' or 'claude_code')
Filter to a single provenance source (e.g. 'gateway' or 'claude_code')
Filter to a single session/project label (the source_label carried by imported usage)
Filter to a single session/project label (the source_label carried by imported usage)
Filter to one or more API key ids; repeatable (api_key_id=a&api_key_id=b). Several values match any of them. At most 50 per call.
Filter to one or more API key ids; repeatable (api_key_id=a&api_key_id=b). Several values match any of them. At most 50 per call.
Filter by token-pricing state: true = only rows whose model tokens were priced, false = only rows that still need pricing (no cost at all, or tokens that were never metered because the model had no rate). A row charged only for gateway-run tool calls still counts as needing pricing.
Filter by token-pricing state: true = only rows whose model tokens were priced, false = only rows that still need pricing (no cost at all, or tokens that were never metered because the model had no rate). A row charged only for gateway-run tool calls still counts as needing pricing.
Filter to requests that ran a gateway-run tool. 'any' matches any tool; a tool name (web_search, code_execution) matches that tool specifically.
Filter to requests that ran a gateway-run tool. 'any' matches any tool; a tool name (web_search, code_execution) matches that tool specifically.
Filter by budget participation: true = only enforced gateway rows, false = only imported rows that never touch a budget
Filter by budget participation: true = only enforced gateway rows, false = only imported rows that never touch a budget
Only usage recorded in this workspace.
Only usage recorded in this workspace.
Time-series granularity: 'hour' or 'day'
Time-series granularity: 'hour' or 'day'
Which breakdowns to compute; repeatable (dimensions=model&dimensions=user). Each value names the 'by_<value>' response field it fills, except 'status_code', which fills the failure taxonomy in 'errors_by_status_code'. Omit for every breakdown (the default); pass 'none' for a totals-and-series-only response. Each dimension left out skips one GROUP BY scan, so a caller that reads only the tiles or the time series should say so. Fields that were not requested come back empty.
Which breakdowns to compute; repeatable (dimensions=model&dimensions=user). Each value names the 'by_<value>' response field it fills, except 'status_code', which fills the failure taxonomy in 'errors_by_status_code'. Omit for every breakdown (the default); pass 'none' for a totals-and-series-only response. Each dimension left out skips one GROUP BY scan, so a caller that reads only the tiles or the time series should say so. Fields that were not requested come back empty.
Response
Successful Response
Changes
Changed in 1 of the 134 revisions of this API.1
- ○
endpoint added
endpoint-added
- ○