Claude Platform Docs

Kosten

Kosten nach Dimension abrufen
CostListPage beta().organization().analytics().cost().list(params, requestOptions = RequestOptions.none())
GET/v1/organizations/analytics/cost
Requires anthropic-beta: analytics-usage-cost-2026-08-24. Learn how to send beta headers.

Ruft die Kosten in USD über einen Datumsbereich ab, aufgeschlüsselt nach Dimension.

Models
class BetaAnalyticsCostGroup { actor; actorType; agentId; /* 19 more */ }

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

enum BetaAnalyticsCostGroupBy
class BetaAnalyticsCostItem { cost; endingAt; group; startingAt; }

Cost for this row.

String amount

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

String currency

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

String listAmount

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

Optional<Long> requests

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).

OffsetDateTime endingAt

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.

formatdate-time

The dimension values this row's cost is broken out by.

OffsetDateTime startingAt

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.

formatdate-time
class BetaAnalyticsCostMetrics { amount; currency; listAmount; requests; }

The cost of one row.

String amount

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

String currency

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

String listAmount

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

Optional<Long> requests

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).

enum BetaAnalyticsCostOrderBy
AMOUNT("amount")
LIST_AMOUNT("list_amount")
TIME("time")