Class: Anthropic::Models::Beta::Organization::BetaAnalyticsUsageBucketedResult
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::Organization::BetaAnalyticsUsageBucketedResult
- Defined in:
- lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb,
sig/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rbs
Defined Under Namespace
Modules: InferenceGeo, Speed
Instance Attribute Summary collapse
-
#cache_creation ⇒ Anthropic::Models::Beta::BetaCacheCreation
The number of input tokens for cache creation.
-
#cache_read_input_tokens ⇒ Integer
The number of input tokens read from the cache.
-
#claude_tag_category ⇒ Symbol, ...
Claude Tag (Claude in Slack) spend category:
engaged(a person addressed Claude in a channel or thread),proactive(Claude responded without being addressed),scheduled(a scheduled routine ran),monitoring(Claude watching a channel it was asked to monitor), ordm(direct messages with Claude). -
#claude_tag_user_id ⇒ String?
Slack user ID (for example
U0123ABCDEF) of the member the Claude Tag (Claude in Slack) usage is attributed to, not a claude.ai user ID. -
#context_window ⇒ Symbol, ...
Context-window pricing tier of the usage or cost.
-
#inference_geo ⇒ Symbol, ...
Inference region of the usage or cost.
-
#model ⇒ String?
Model that produced the usage or cost, as a model name in the form the
models[]filter accepts (for example,claude-opus-5). -
#output_tokens ⇒ Integer
The number of output tokens generated.
-
#product ⇒ String?
Product surface that produced the usage or cost.
-
#rbac_group_id ⇒ String?
RBAC group (team) the usage is attributed to, in the public tagged
rbac_group_...spelling — the same spelling the activity resources use for this key, so the same team has one id across resources and it round-trips as anrbac_group_ids[]filter value. -
#requests ⇒ Integer?
Number of API requests in this row's scope.
-
#server_tool_use ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsServerToolUse
Server-side tool usage metrics.
-
#slack_channel_id ⇒ String?
Slack channel the usage originated from.
-
#speed ⇒ Symbol, ...
Inference speed mode of the usage or cost:
fastorstandard. -
#uncached_input_tokens ⇒ Integer
The number of uncached input tokens processed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cache_creation:, cache_read_input_tokens:, claude_tag_category:, claude_tag_user_id:, context_window:, inference_geo:, model:, output_tokens:, product:, rbac_group_id:, requests:, server_tool_use:, slack_channel_id:, speed:, uncached_input_tokens:) ⇒ void
constructor
Some parameter documentations has been truncated, see BetaAnalyticsUsageBucketedResult for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(cache_creation:, cache_read_input_tokens:, claude_tag_category:, claude_tag_user_id:, context_window:, inference_geo:, model:, output_tokens:, product:, rbac_group_id:, requests:, server_tool_use:, slack_channel_id:, speed:, uncached_input_tokens:) ⇒ void
Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::BetaAnalyticsUsageBucketedResult for more details.
`group_
|
|
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 144
|
Instance Attribute Details
#cache_creation ⇒ Anthropic::Models::Beta::BetaCacheCreation
The number of input tokens for cache creation.
12 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 12 required :cache_creation, -> { Anthropic::Beta::BetaCacheCreation } |
#cache_read_input_tokens ⇒ Integer
The number of input tokens read from the cache.
18 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 18 required :cache_read_input_tokens, Integer |
#claude_tag_category ⇒ Symbol, ...
Claude Tag (Claude in Slack) spend category: engaged (a person addressed
Claude in a channel or thread), proactive (Claude responded without being
addressed), scheduled (a scheduled routine ran), monitoring (Claude watching
a channel it was asked to monitor), or dm (direct messages with Claude).
Populated only when claude_tag_category is in group_by[]; null for usage
that is not Claude Tag. Direct-message usage is billed to the individual user
and is reported under that user's product, not under claude-tag. New
categories may be added over time.
31 32 33 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 31 required :claude_tag_category, enum: -> { Anthropic::Beta::Organization::BetaAnalyticsClaudeTagCategory }, nil?: true |
#claude_tag_user_id ⇒ String?
Slack user ID (for example U0123ABCDEF) of the member the Claude Tag (Claude
in Slack) usage is attributed to, not a claude.ai user ID. Populated only when
claude_tag_user_id is in group_by[]; null for usage that is not Claude Tag
and for Claude Tag usage that is not attributed to a single user (for example
monitoring, and proactive usage Claude initiated), so per-user rows can sum
to less than the Claude Tag total. Cannot be combined with
group_by[]=rbac_group_id or the rbac_group_ids[] filter.
45 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 45 required :claude_tag_user_id, String, nil?: true |
#context_window ⇒ Symbol, ...
Context-window pricing tier of the usage or cost. Null unless context_window
is in group_by[]; it can also be null on grouped rows with no context-window
tier, such as code execution.
53 54 55 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 53 required :context_window, enum: -> { Anthropic::Beta::Organization::BetaAnalyticsContextWindow }, nil?: true |
#inference_geo ⇒ Symbol, ...
Inference region of the usage or cost. Null unless inference_geo is in
group_by[]; it can also be null on grouped rows where the region is not set
(the rows that inference_geos[]=not_available matches).
63 64 65 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 63 required :inference_geo, enum: -> { Anthropic::Beta::Organization::BetaAnalyticsUsageBucketedResult::InferenceGeo }, nil?: true |
#model ⇒ String?
Model that produced the usage or cost, as a model name in the form the
models[] filter accepts (for example, claude-opus-5). Null unless model is
in group_by[]; it can also be null on grouped rows whose usage or cost is not
attributed to a specific model, such as code execution.
74 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 74 required :model, String, nil?: true |
#output_tokens ⇒ Integer
The number of output tokens generated.
80 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 80 required :output_tokens, Integer |
#product ⇒ String?
Product surface that produced the usage or cost. Null unless product is in
group_by[]; it can also be null on grouped rows whose usage cannot be
attributed to a known surface. Values include chat, claude_code, cowork,
office_agent, claude_in_chrome, claude_design, and claude-tag.
claude-tag is Claude Tag, the Claude product in Slack. Some unattributed usage
is reported as "other".
91 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 91 required :product, String, nil?: true |
#rbac_group_id ⇒ String?
RBAC group (team) the usage is attributed to, in the public tagged
rbac_group_... spelling — the same spelling the activity resources use for
this key, so the same team has one id across resources and it round-trips as an
rbac_group_ids[] filter value. Populated only when rbac_group_id is in
group_by[]. Any-membership semantics: a user in several groups contributes
their full usage to each of those groups' rows, so the named-group rows overlap
and their sum can exceed the org total. A null value is the single unassigned
row: users in no group on that (UTC) day. For the true org total, run the same
query without group_by[].
105 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 105 required :rbac_group_id, String, nil?: true |
#requests ⇒ Integer?
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).
113 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 113 required :requests, Integer, nil?: true |
#server_tool_use ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsServerToolUse
Server-side tool usage metrics.
119 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 119 required :server_tool_use, -> { Anthropic::Beta::Organization::BetaAnalyticsServerToolUse } |
#slack_channel_id ⇒ String?
Slack channel the usage originated from. Populated only when slack_channel_id
is in group_by[]; null for usage outside Slack (and for rows recorded before
channel attribution was enabled).
127 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 127 required :slack_channel_id, String, nil?: true |
#speed ⇒ Symbol, ...
Inference speed mode of the usage or cost: fast or standard. Null unless
speed is in group_by[].
134 135 136 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 134 required :speed, enum: -> { Anthropic::Beta::Organization::BetaAnalyticsUsageBucketedResult::Speed }, nil?: true |
#uncached_input_tokens ⇒ Integer
The number of uncached input tokens processed.
142 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 142 required :uncached_input_tokens, Integer |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb', line 191
|
Instance Method Details
#to_hash ⇒ {
73 |
# File 'sig/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rbs', line 73
def to_hash: -> {
|