Claude Platform Docs

Cost

Get Cost By Dimension
GET/v1/organizations/analytics/cost

Get cost in USD across a date range, broken out by dimension.

Models
BetaAnalyticsCostGroup object{ actor, actor_type, agent_id, 18 more }

The dimension values one cost row is broken out by, including cost_type and token_type.

BetaAnalyticsCostGroupBy = "actor" or "actor_type" or "agent_id" or 18 more
One of the following:
BetaAnalyticsCostItem object{ cost, ending_at, group, starting_at }
BetaAnalyticsCostMetrics object{ amount, currency, list_amount, requests }

The cost of one row.

amount: string

Amount (post-discount, pre-credit) in fractional cents (minor units).

currency: string

Currency code for the cost amount. Currently always "USD".

defaultUSD
list_amount: string

List-price amount (pre-discount) in fractional cents.

requests: number or null

Number of API requests in this row's scope. Null when group_by includes cost_type or token_type (the count has no per-component attribution; read it from the ungrouped response). For sandbox / code-execution events, this counts execution spans rather than HTTP requests (these rows surface with product: null).

BetaAnalyticsCostOrderBy = "amount" or "list_amount" or "time"
One of the following:
"amount"
"list_amount"
"time"