The usage summary of a period by model or by agent
Groups the sessions GET /v1/usage/summary adds up by the model their metered calls named (by=model) or by their agent (by=agent), largest cost first, with the input, output, cache read and cache write tokens of those calls. scope, since, until and who may read which scope are exactly the summary's; the period spans at most 366 days.
token_count is the four token columns' sum; the 1-hour cache writes are inside cache_creation_input_tokens. totals is the summary of the same period: its session_count, token_count and cost_usd equal it.
by=agent: each session counts once under its agent (keyis the agent id,labelits name), so the rows add up tototalsin every column. Sessions without an agent are the row whosekeyandlabelare null.by=model: a session counts under every model it called, so the rows'session_countmay add up to more than the totals'. A session's cost its metered calls do not explain, such as an engine's turn totals from before proxy metering, is the row whosekeyandlabelare null, with no tokens.
It changes nothing.
Scope: sessions:read (API key or cookie session).
AuthorizationBearer <token>For servers and scripts: an API key sent as an HTTP bearer token, Bearer <key>. It holds exactly the scopes it was issued with; a key issued before scopes existed holds none. It never needs the CSRF header, and it cannot manage agents, members, teams or API keys. Issue one in the web console under Settings → API keys; each operation names the scope it needs.
Scope: sessions:read
scope*stringWhose sessions to count. The description says who may read each scope.
"installation""me"since*|Start of the period, inclusive: a date (2026-10-01, that day's 00:00 UTC) or a timestamp with an offset, moved to UTC.
until?|End of the period, exclusive, in the same forms as since. Without it the period ends when the figures are read.
by*stringGroups by the model the metered calls named, or by agent.
"model""agent"The groups and their totals; this example is by=model.
application/json- response
rows*array<>totals*curl -X GET 'https://example.com/v1/usage/breakdown?scope=installation&since=2019-08-24&by=model'{ "rows": [ { "key": "claude-opus-5-5", "label": "claude-opus-5-5", "session_count": 9, "input_tokens": 182000, "output_tokens": 64000, "cache_read_input_tokens": 1210000, "cache_creation_input_tokens": 96000, "token_count": 1552000, "cost_usd": "2.811000" }, { "key": null, "label": null, "session_count": 1, "input_tokens": 0, "output_tokens": 0, "cache_read_input_tokens": 0, "cache_creation_input_tokens": 0, "token_count": 0, "cost_usd": "0.407400" } ], "totals": { "session_count": 10, "input_tokens": 182000, "output_tokens": 64000, "cache_read_input_tokens": 1210000, "cache_creation_input_tokens": 96000, "token_count": 1552000, "cost_usd": "3.218400" }}