Class: Anthropic::Models::Beta::Organization::Analytics::CostReportListParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb,
sig/anthropic/models/beta/organization/analytics/cost_report_list_params.rbs

Overview

See Also:

  • Anthropic::Resources::Beta::Organization::Analytics::CostReport#list

Defined Under Namespace

Modules: BucketWidth, GroupBy, Speed

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(starting_at:, bucket_width: nil, claude_tag_categories: nil, claude_tag_user_ids: nil, context_windows: nil, ending_at: nil, group_by: nil, inference_geos: nil, limit: nil, models: nil, page: nil, products: nil, rbac_group_ids: nil, slack_channel_ids: nil, speeds: nil, user_ids: nil, request_options: {}) ⇒ CostReportListParams

Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::Analytics::CostReportListParams for more details.

Parameters:

  • starting_at (Time) —

    Start of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days a

  • bucket_width (Symbol, Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::BucketWidth) (defaults to: nil) —

    Time bucket granularity.

  • claude_tag_categories (Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsClaudeTagCategory>, nil) (defaults to: nil) —

    Filter to Claude Tag (Claude in Slack) usage in specific spend categories. Usage

  • claude_tag_user_ids (Array<String>, nil) (defaults to: nil) —

    Filter to Claude Tag (Claude in Slack) usage attributed to specific Slack users,

  • context_windows (Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsContextWindow>, nil) (defaults to: nil) —

    Filter to specific context-window pricing tiers. Use group_by[]=context_window

  • ending_at (Time, nil) (defaults to: nil) —

    End of range, exclusive. When omitted, defaults to the earlier of now and

  • group_by (Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::GroupBy>, nil) (defaults to: nil) —

    Dimensions to break each time bucket out by. Defaults to no grouping (one total

  • inference_geos (Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsInferenceGeoFilter>, nil) (defaults to: nil) —

    Filter to specific inference regions. not_available matches rows where the reg

  • limit (Integer, nil) (defaults to: nil) —

    Maximum number of time buckets per page. Defaults and caps vary by

  • models (Array<String>, nil) (defaults to: nil) —

    Models to include. Defaults to all models. Use group_by[]=model to break out p

  • page (String, nil) (defaults to: nil) —

    Opaque cursor from a previous response's next_page field.

  • products (Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsProductFilter>, nil) (defaults to: nil) —

    Product surfaces to include. Defaults to all products. Use group_by[]=product

  • rbac_group_ids (Array<String>, nil) (defaults to: nil) —

    Filter to usage attributed to specific RBAC groups. Accepts tagged RBAC group ID

  • slack_channel_ids (Array<String>, nil) (defaults to: nil) —

    Filter to usage originating from specific Slack channels. Use

  • speeds (Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::Speed>, nil) (defaults to: nil) —

    Filter to fast or standard inference mode. Use group_by[]=speed to break out p

  • user_ids (Array<String>, nil) (defaults to: nil) —

    Filter to specific users by tagged user ID.

  • request_options (Anthropic::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})
  • starting_at: (Time)
  • bucket_width: (Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::bucket_width) (defaults to: nil)
  • claude_tag_categories: (::Array[Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category], nil) (defaults to: nil)
  • claude_tag_user_ids: (::Array[String], nil) (defaults to: nil)
  • context_windows: (::Array[Anthropic::Models::Beta::Organization::beta_analytics_context_window], nil) (defaults to: nil)
  • ending_at: (Time, nil) (defaults to: nil)
  • group_by: (::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::group_by], nil) (defaults to: nil)
  • inference_geos: (::Array[Anthropic::Models::Beta::Organization::beta_analytics_inference_geo_filter], nil) (defaults to: nil)
  • limit: (Integer, nil) (defaults to: nil)
  • models: (::Array[String], nil) (defaults to: nil)
  • page: (String, nil) (defaults to: nil)
  • products: (::Array[Anthropic::Models::Beta::Organization::beta_analytics_product_filter], nil) (defaults to: nil)
  • rbac_group_ids: (::Array[String], nil) (defaults to: nil)
  • slack_channel_ids: (::Array[String], nil) (defaults to: nil)
  • speeds: (::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::speed], nil) (defaults to: nil)
  • user_ids: (::Array[String], nil) (defaults to: nil)
  • request_options: (Anthropic::request_opts) (defaults to: {})


# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 155

Instance Attribute Details

#bucket_width ⇒ Symbol, ...

Time bucket granularity.

Parameters:

  • (Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::bucket_width)

Returns:



24
25
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 24

optional :bucket_width,
enum: -> { Anthropic::Beta::Organization::Analytics::CostReportListParams::BucketWidth }

#claude_tag_categories ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsClaudeTagCategory>?

Filter to Claude Tag (Claude in Slack) usage in specific spend categories. Usage with no category never matches. Use group_by[]=claude_tag_category to break out per-category values.

Parameters:

  • value (::Array[Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category], nil)

Returns:



33
34
35
36
37
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 33

optional :claude_tag_categories,
-> {
  Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsClaudeTagCategory]
},
nil?: true

#claude_tag_user_ids ⇒ Array<String>?

Filter to Claude Tag (Claude in Slack) usage attributed to specific Slack users, by Slack user ID (for example U0123ABCDEF), not claude.ai user ID. Usage that is not Claude Tag, and Claude Tag usage not attributed to a single user, never matches. Use group_by[]=claude_tag_user_id to break out per-user values.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


46
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 46

optional :claude_tag_user_ids, Anthropic::Internal::Type::ArrayOf[String], nil?: true

#context_windows ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsContextWindow>?

Filter to specific context-window pricing tiers. Use group_by[]=context_window to break out per-tier values.

Parameters:

  • value (::Array[Anthropic::Models::Beta::Organization::beta_analytics_context_window], nil)

Returns:



53
54
55
56
57
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 53

optional :context_windows,
-> {
  Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsContextWindow]
},
nil?: true

#ending_at ⇒ Time?

End of range, exclusive. When omitted, defaults to the earlier of now and starting_at + 31 days. The range may span at most 31 days.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


64
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 64

optional :ending_at, Time, nil?: true

#group_by ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::GroupBy>?

Dimensions to break each time bucket out by. Defaults to no grouping (one total per bucket). Each bucket reports at most its top 100 groups; a group beyond that cap has no row in that bucket (there is no remainder row), so grouped buckets are not exhaustive when a dimension has more than 100 distinct values.

Parameters:

  • value (::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::group_by], nil)

Returns:



73
74
75
76
77
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 73

optional :group_by,
-> {
  Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::Analytics::CostReportListParams::GroupBy]
},
nil?: true

#inference_geos ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsInferenceGeoFilter>?

Filter to specific inference regions. not_available matches rows where the region is unset. Use group_by[]=inference_geo to break out per-region values.

Parameters:

  • value (::Array[Anthropic::Models::Beta::Organization::beta_analytics_inference_geo_filter], nil)

Returns:



84
85
86
87
88
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 84

optional :inference_geos,
-> {
  Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsInferenceGeoFilter]
},
nil?: true

#limit ⇒ Integer?

Maximum number of time buckets per page. Defaults and caps vary by bucket_width (1d: default 7, max 31; 1h: default 24, max 168; 1m: default 60, max 256).

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


96
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 96

optional :limit, Integer, nil?: true

#models ⇒ Array<String>?

Models to include. Defaults to all models. Use group_by[]=model to break out per-model values.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


103
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 103

optional :models, Anthropic::Internal::Type::ArrayOf[String], nil?: true

#page ⇒ String?

Opaque cursor from a previous response's next_page field.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


109
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 109

optional :page, String, nil?: true

#products ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsProductFilter>?

Product surfaces to include. Defaults to all products. Use group_by[]=product to break out per-product values.

Parameters:

  • value (::Array[Anthropic::Models::Beta::Organization::beta_analytics_product_filter], nil)

Returns:



116
117
118
119
120
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 116

optional :products,
-> {
  Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsProductFilter]
},
nil?: true

#rbac_group_ids ⇒ Array<String>?

Filter to usage attributed to specific RBAC groups. Accepts tagged RBAC group IDs (rbac_group_...) or bare group UUIDs. A row matches when the user belonged to any of the listed groups on the (UTC) day the usage occurred; usage with no group attribution never matches.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


129
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 129

optional :rbac_group_ids, Anthropic::Internal::Type::ArrayOf[String], nil?: true

#slack_channel_ids ⇒ Array<String>?

Filter to usage originating from specific Slack channels. Use group_by[]=slack_channel_id to break out per-channel values.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


136
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 136

optional :slack_channel_ids, Anthropic::Internal::Type::ArrayOf[String], nil?: true

#speeds ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::Speed>?

Filter to fast or standard inference mode. Use group_by[]=speed to break out per-mode values.

Parameters:

  • value (::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::speed], nil)

Returns:



143
144
145
146
147
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 143

optional :speeds,
-> {
  Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::Analytics::CostReportListParams::Speed]
},
nil?: true

#starting_at ⇒ Time

Start of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.

Parameters:

  • value (Time)

Returns:

  • (Time)


18
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 18

required :starting_at, Time

#user_ids ⇒ Array<String>?

Filter to specific users by tagged user ID.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


153
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 153

optional :user_ids, Anthropic::Internal::Type::ArrayOf[String], nil?: true

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 202

Instance Method Details

#to_hash ⇒ { starting_at: Time, bucket_width: Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::bucket_width, claude_tag_categories: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category]?, claude_tag_user_ids: ::Array[String]?, context_windows: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_context_window]?, ending_at: Time?, group_by: ::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::group_by]?, inference_geos: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_inference_geo_filter]?, limit: Integer?, models: ::Array[String]?, page: String?, products: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_product_filter]?, rbac_group_ids: ::Array[String]?, slack_channel_ids: ::Array[String]?, speeds: ::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::speed]?, user_ids: ::Array[String]?, request_options: Anthropic::RequestOptions }

Returns:

  • ({ starting_at: Time, bucket_width: Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::bucket_width, claude_tag_categories: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category]?, claude_tag_user_ids: ::Array[String]?, context_windows: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_context_window]?, ending_at: Time?, group_by: ::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::group_by]?, inference_geos: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_inference_geo_filter]?, limit: Integer?, models: ::Array[String]?, page: String?, products: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_product_filter]?, rbac_group_ids: ::Array[String]?, slack_channel_ids: ::Array[String]?, speeds: ::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::speed]?, user_ids: ::Array[String]?, request_options: Anthropic::RequestOptions })


87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'sig/anthropic/models/beta/organization/analytics/cost_report_list_params.rbs', line 87

def to_hash: -> {
  starting_at: Time,
  bucket_width: Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::bucket_width,
  claude_tag_categories: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category]?,
  claude_tag_user_ids: ::Array[String]?,
  context_windows: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_context_window]?,
  ending_at: Time?,
  group_by: ::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::group_by]?,
  inference_geos: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_inference_geo_filter]?,
  limit: Integer?,
  models: ::Array[String]?,
  page: String?,
  products: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_product_filter]?,
  rbac_group_ids: ::Array[String]?,
  slack_channel_ids: ::Array[String]?,
  speeds: ::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::speed]?,
  user_ids: ::Array[String]?,
  request_options: Anthropic::RequestOptions
}