사용량
차원별 토큰 사용량 조회
client.Beta.Organization.Analytics.Usage.List(ctx, params) (*ReportPageCursor[BetaAnalyticsUsageItem], error)anthropic-beta: analytics-usage-cost-2026-08-24. Learn how to send beta headers.날짜 범위에 걸친 토큰 사용량을 차원별로 나누어 조회합니다.
Models
type BetaAnalyticsUsageGroup struct { Actor; ActorType; AgentID; /* 17 more */ }The dimension values one usage row is broken out by; each is null
unless its dimension is in group_by[].
The dimension values one usage row is broken out by; each is null
unless its dimension is in group_by[].
type BetaAnalyticsUsageGroupBy string
type BetaAnalyticsUsageItem struct { EndingAt; Group; StartingAt; Usage }
type BetaAnalyticsUsageMetrics struct { CacheCreation; CacheReadInputTokens; OutputTokens; /* 4 more */ }The token usage of one row.
The token usage of one row.
CacheCreation BetaCacheCreationThe number of input tokens for cache creation.
The number of input tokens for cache creation.
Ephemeral1hInputTokens int64The number of input tokens used to create the 1 hour cache entry.
The number of input tokens used to create the 1 hour cache entry.
Ephemeral5mInputTokens int64The number of input tokens used to create the 5 minute cache entry.
The number of input tokens used to create the 5 minute cache entry.
The number of input tokens read from the cache.
The number of output tokens generated.
Number of API requests in this row's scope. For sandbox / code-execution events, this counts execution spans rather than HTTP requests (these rows surface with product: null).
ServerToolUse BetaAnalyticsServerToolUseServer-side tool usage metrics.
Server-side tool usage metrics.
The number of web search requests made.
Total token count across all token types. This is the value the default order_by (total_tokens) sorts on.
The number of uncached input tokens processed.