Costo
Ottieni il costo per dimensione
beta.organization.analytics.cost.list(**kwargs) -> SyncReportPageCursor[BetaAnalyticsCostItem]anthropic-beta: analytics-usage-cost-2026-08-24. Learn how to send beta headers.Get cost in USD across a date range, broken out by dimension.
Models
class BetaAnalyticsCostGroup: actor; actor_type; agent_id; ... # 19 moreThe dimension values one cost row is broken out by, including
cost_type and token_type.
The dimension values one cost row is broken out by, including
cost_type and token_type.
type BetaAnalyticsCostGroupBy = Literal["actor", "actor_type", "agent_id", 19 more]
class BetaAnalyticsCostItem: cost; ending_at; group; starting_at
cost: BetaAnalyticsCostMetricsCost for this row.
Cost for this row.
Amount (post-discount, pre-credit) in fractional cents (minor units).
currency: strCurrency code for the cost amount. Currently always "USD".
Currency code for the cost amount. Currently always "USD".
List-price amount (pre-discount) in fractional cents.
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).
ending_at: datetimeEnd of the period this row covers (exclusive), as an RFC 3339 UTC timestamp: the end of the row's time bucket when a time-bucket width is set; otherwise the requested ending_at (or, when omitted, the earlier of now and starting_at plus 31 days) rounded down to the hour, because without a time bucket the report covers whole hours.
End of the period this row covers (exclusive), as an RFC 3339 UTC timestamp: the end of the row's time bucket when a time-bucket width is set; otherwise the requested ending_at (or, when omitted, the earlier of now and starting_at plus 31 days) rounded down to the hour, because without a time bucket the report covers whole hours.
group: BetaAnalyticsCostGroupThe dimension values this row's cost is broken out by.
The dimension values this row's cost is broken out by.
starting_at: datetimeStart of the period this row covers (inclusive), as an RFC 3339 UTC timestamp: the start of the row's time bucket when a time-bucket width is set, otherwise the requested starting_at rounded down to the hour.
Start of the period this row covers (inclusive), as an RFC 3339 UTC timestamp: the start of the row's time bucket when a time-bucket width is set, otherwise the requested starting_at rounded down to the hour.
class BetaAnalyticsCostMetrics: amount; currency; list_amount; requestsThe cost of one row.
The cost of one row.
Amount (post-discount, pre-credit) in fractional cents (minor units).
currency: strCurrency code for the cost amount. Currently always "USD".
Currency code for the cost amount. Currently always "USD".
List-price amount (pre-discount) in fractional cents.
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).