Usage
Org-wide and per-project spend rollups with per-model breakdowns
Two endpoints report spend, both taking start and end (YYYY-MM-DD, inclusive; default is the current month) and requiring the read_usage scope. Spend fields are USD: merge_hosted_spend is managed-credential spend, byok_spend is BYOK usage at list price, and web_search_spend covers server-side web search.
Totals are day-granular for any range. model_spend (and the vendor breakdown) aggregate by calendar month, covering the months your range overlaps, hence model_spend_granularity: "month" in responses.
Organization rollup
GET /v1/organization/usage returns org totals plus a per-model breakdown. Add group_by=project, group_by=api_key, or group_by=vendor for a per-dimension breakdown.
Project usage
GET /v1/projects/{project_id}/usage returns the same day-granular totals scoped to one project, plus the project’s per-model breakdown.
Project model_spend accrues from when per-project model tracking was deployed; months before that report totals with an empty map.