---
title: Get Cost By Dimension
url: https://platform.claude.com/docs/en/api/go/beta/organization/analytics/cost/list
---

# Get Cost By Dimension

`client.Beta.Organization.Analytics.Cost.List(ctx, params) (*ReportPageCursor[BetaAnalyticsCostItem], error)`

**GET** `/v1/organizations/analytics/cost`

Get cost in USD across a date range, broken out by dimension.

Returns one row per combination of the requested `group_by[]`
dimensions (and time bucket, when `time_bucket_width` is set) that has
cost in the range, ranked by spend or ordered by time bucket; every
combination is returned across pages. With no `group_by[]` and no
`time_bucket_width`, a single row aggregates the whole range. Includes
all cost, whether or not it is attributable to a seat user. Requires an
API key with the `read:analytics` scope, or an Admin API key.

## Parameters

- `params BetaOrganizationAnalyticsCostListParams`

  - `StartingAt Time` (query parameter)

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

    format: date-time

  - `ActorIDs []string Optional` (query parameter)

    Filter to usage attributed to specific identities, by tagged ID: a `user_...`, `svac_...` (service account), or `apikey_...` ID. An `apikey_` entry matches only usage attributed to the key itself, not usage on that key attributed to a user or service account (use `api_key_ids[]` for every request a key authenticated). Federated identities have no tagged ID; select them with `actor_types[]`. Use `group_by[]=actor` to break out per-identity values.

    maxItems: 100

  - `ActorTypes []BetaAnalyticsActorType Optional` (query parameter)

    Filter to usage attributed to specific kinds of identity. Use `group_by[]=actor_type` to break out per-kind values.

    maxItems: 100

    - `const BetaAnalyticsActorTypeAPIActor BetaAnalyticsActorType = "api_actor"`

    - `const BetaAnalyticsActorTypeFederatedActor BetaAnalyticsActorType = "federated_actor"`

    - `const BetaAnalyticsActorTypeServiceAccountActor BetaAnalyticsActorType = "service_account_actor"`

    - `const BetaAnalyticsActorTypeUserActor BetaAnalyticsActorType = "user_actor"`

  - `AgentIDs []string Optional` (query parameter)

    Filter to usage incurred by sessions of specific Claude Managed Agents agents. Use `group_by[]=agent_id` to break out per-agent values. Claude Platform organizations only.

    maxItems: 100

  - `APIKeyIDs []string Optional` (query parameter)

    Filter to usage authenticated by specific API keys, by tagged API key ID (`apikey_...`), whichever identity the usage is attributed to. Include an empty entry (`api_key_ids[]=`) to also match usage that no API key authenticated. Use `group_by[]=api_key_id` to break out per-key values; usage without a key has a null `api_key_id`. Claude Platform organizations only.

    maxItems: 100

  - `ClaudeTagCategories []BetaAnalyticsClaudeTagCategory Optional` (query parameter)

    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.

    maxItems: 100

    - `const BetaAnalyticsClaudeTagCategoryDm BetaAnalyticsClaudeTagCategory = "dm"`

    - `const BetaAnalyticsClaudeTagCategoryEngaged BetaAnalyticsClaudeTagCategory = "engaged"`

    - `const BetaAnalyticsClaudeTagCategoryMonitoring BetaAnalyticsClaudeTagCategory = "monitoring"`

    - `const BetaAnalyticsClaudeTagCategoryProactive BetaAnalyticsClaudeTagCategory = "proactive"`

    - `const BetaAnalyticsClaudeTagCategoryScheduled BetaAnalyticsClaudeTagCategory = "scheduled"`

  - `ClaudeTagUserIDs []string Optional` (query parameter)

    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.

    maxItems: 100

  - `ContextWindows []BetaAnalyticsContextWindow Optional` (query parameter)

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

    maxItems: 100

    - `const BetaAnalyticsContextWindowFrom0To200k BetaAnalyticsContextWindow = "0-200k"`

    - `const BetaAnalyticsContextWindowFrom200kTo1M BetaAnalyticsContextWindow = "200k-1M"`

  - `DeploymentIDs []string Optional` (query parameter)

    Filter to usage incurred by Claude Managed Agents sessions that specific deployments started. Use `group_by[]=deployment_id` to break out per-deployment values. Claude Platform organizations only.

    maxItems: 100

  - `EndingAt param.Opt[Time] Optional` (query parameter)

    End of range, exclusive. Required when `time_bucket_width` is set. Without `time_bucket_width`, defaults to the earlier of now and `starting_at` + 31 days. The range may span at most 31 days.

    format: date-time

  - `EnvironmentIDs []string Optional` (query parameter)

    Filter to usage incurred by Claude Managed Agents sessions that ran in specific environments. Use `group_by[]=environment_id` to break out per-environment values. Claude Platform organizations only.

    maxItems: 100

  - `ExcludeDeletedUsers param.Opt[bool] Optional` (query parameter)

    If true, omit rows whose `actor` is a `user_actor` with `deleted: true`. Requires `group_by[]=actor`. Rows for other actor types, and rows whose `actor` is null, are always kept. A page may contain fewer than `limit` rows; use `has_more` and `next_page` to paginate as usual.

  - `GroupBy []BetaAnalyticsCostGroupBy Optional` (query parameter)

    Dimensions to break cost out by (at most 5, not counting `cost_type` and `token_type`): one row per combination of their values with cost in the range (and per time bucket, when `time_bucket_width` is set), every combination returned across pages rather than a capped top set. `cost_type` and `token_type` do not count toward `limit`: `cost_type` returns one row per cost component (tokens, web search, code execution, and `session_usage`, Claude Managed Agents session time); `token_type` returns one row per token type, each with `cost_type: "tokens"`; combining both returns the per-token-type rows plus the web-search, code-execution and session-usage rows. When omitted, a single row aggregates the whole range.

    maxItems: 100

    - `const BetaAnalyticsCostGroupByActor BetaAnalyticsCostGroupBy = "actor"`

    - `const BetaAnalyticsCostGroupByActorType BetaAnalyticsCostGroupBy = "actor_type"`

    - `const BetaAnalyticsCostGroupByAgentID BetaAnalyticsCostGroupBy = "agent_id"`

    - `const BetaAnalyticsCostGroupByAPIKeyID BetaAnalyticsCostGroupBy = "api_key_id"`

    - `const BetaAnalyticsCostGroupByClaudeTagCategory BetaAnalyticsCostGroupBy = "claude_tag_category"`

    - `const BetaAnalyticsCostGroupByClaudeTagUserID BetaAnalyticsCostGroupBy = "claude_tag_user_id"`

    - `const BetaAnalyticsCostGroupByContextWindow BetaAnalyticsCostGroupBy = "context_window"`

    - `const BetaAnalyticsCostGroupByCostType BetaAnalyticsCostGroupBy = "cost_type"`

    - `const BetaAnalyticsCostGroupByDeploymentID BetaAnalyticsCostGroupBy = "deployment_id"`

    - `const BetaAnalyticsCostGroupByEnvironmentID BetaAnalyticsCostGroupBy = "environment_id"`

    - `const BetaAnalyticsCostGroupByInferenceGeo BetaAnalyticsCostGroupBy = "inference_geo"`

    - `const BetaAnalyticsCostGroupByModel BetaAnalyticsCostGroupBy = "model"`

    - `const BetaAnalyticsCostGroupByOrganizationID BetaAnalyticsCostGroupBy = "organization_id"`

    - `const BetaAnalyticsCostGroupByProduct BetaAnalyticsCostGroupBy = "product"`

    - `const BetaAnalyticsCostGroupByRBACGroupID BetaAnalyticsCostGroupBy = "rbac_group_id"`

    - `const BetaAnalyticsCostGroupByServiceTier BetaAnalyticsCostGroupBy = "service_tier"`

    - `const BetaAnalyticsCostGroupBySessionID BetaAnalyticsCostGroupBy = "session_id"`

    - `const BetaAnalyticsCostGroupBySlackChannelID BetaAnalyticsCostGroupBy = "slack_channel_id"`

    - `const BetaAnalyticsCostGroupBySpeed BetaAnalyticsCostGroupBy = "speed"`

    - `const BetaAnalyticsCostGroupByTokenType BetaAnalyticsCostGroupBy = "token_type"`

    - `const BetaAnalyticsCostGroupByUserProfileID BetaAnalyticsCostGroupBy = "user_profile_id"`

    - `const BetaAnalyticsCostGroupByWorkspaceID BetaAnalyticsCostGroupBy = "workspace_id"`

  - `InferenceGeos []BetaAnalyticsInferenceGeoFilter Optional` (query parameter)

    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.

    maxItems: 100

    - `const BetaAnalyticsInferenceGeoFilterGlobal BetaAnalyticsInferenceGeoFilter = "global"`

    - `const BetaAnalyticsInferenceGeoFilterNotAvailable BetaAnalyticsInferenceGeoFilter = "not_available"`

    - `const BetaAnalyticsInferenceGeoFilterUs BetaAnalyticsInferenceGeoFilter = "us"`

  - `Limit param.Opt[int64] Optional` (query parameter)

    Number of rows per page (1-1000, default 20). `cost_type`/`token_type` fan-out rows (cost endpoint only) do not count toward this limit, so `data` can exceed it.

    minimum: 1, maximum: 1000

  - `Models []string Optional` (query parameter)

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

    maxItems: 100

  - `Order BetaAnalyticsUsageCostSortOrder Optional` (query parameter)

    Sort direction of the `order_by` metric, or of the time buckets when `order_by` is `time` and `time_bucket_width` is set. Defaults to `desc`.

  - `OrderBy BetaAnalyticsCostOrderBy Optional` (query parameter)

    Row order. A metric ranks rows by that metric in the `order` direction. `time` orders rows by time bucket in the `order` direction (newest first by default) and, within a bucket, by `amount`, highest first. `time` takes effect only with `time_bucket_width`; without it, `time` is the same as `amount`. Defaults to `amount`.

  - `OrganizationIDs []string Optional` (query parameter)

    Filter a parent organization's report to specific child organizations, by organization UUID or `org_` ID; an ID that is not one of its child organizations matches nothing. Requires an API key created at the parent organization level. Use `group_by[]=organization_id` to break out per-organization values.

    maxItems: 100

  - `Page param.Opt[string] Optional` (query parameter)

    Opaque cursor from a previous response's `next_page` field.

  - `Products []BetaAnalyticsUsageCostProductFilter Optional` (query parameter)

    Product surfaces to include. Defaults to all products.

    maxItems: 100

    - `const BetaAnalyticsUsageCostProductFilterChat BetaAnalyticsUsageCostProductFilter = "chat"`

    - `const BetaAnalyticsUsageCostProductFilterChatCoworkUnified BetaAnalyticsUsageCostProductFilter = "chat_cowork_unified"`

    - `const BetaAnalyticsUsageCostProductFilterClaudeCode BetaAnalyticsUsageCostProductFilter = "claude_code"`

    - `const BetaAnalyticsUsageCostProductFilterClaudeConsole BetaAnalyticsUsageCostProductFilter = "claude_console"`

    - `const BetaAnalyticsUsageCostProductFilterClaudeDesign BetaAnalyticsUsageCostProductFilter = "claude_design"`

    - `const BetaAnalyticsUsageCostProductFilterClaudeInChrome BetaAnalyticsUsageCostProductFilter = "claude_in_chrome"`

    - `const BetaAnalyticsUsageCostProductFilterClaudeTag BetaAnalyticsUsageCostProductFilter = "claude_tag"`

    - `const BetaAnalyticsUsageCostProductFilterCowork BetaAnalyticsUsageCostProductFilter = "cowork"`

    - `const BetaAnalyticsUsageCostProductFilterManagedAgentsAPI BetaAnalyticsUsageCostProductFilter = "managed_agents_api"`

    - `const BetaAnalyticsUsageCostProductFilterMessageBatchesAPI BetaAnalyticsUsageCostProductFilter = "message_batches_api"`

    - `const BetaAnalyticsUsageCostProductFilterMessagesAPI BetaAnalyticsUsageCostProductFilter = "messages_api"`

    - `const BetaAnalyticsUsageCostProductFilterOfficeAgent BetaAnalyticsUsageCostProductFilter = "office_agent"`

  - `RBACGroupIDs []string Optional` (query parameter)

    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.

    maxItems: 100

  - `ServiceTiers []BetaAnalyticsServiceTier Optional` (query parameter)

    Filter to specific service tiers. Use `group_by[]=service_tier` to break out per-tier values. Claude Platform organizations only; matches nothing for a Claude Enterprise organization.

    maxItems: 100

    - `const BetaAnalyticsServiceTierBatch BetaAnalyticsServiceTier = "batch"`

    - `const BetaAnalyticsServiceTierFlex BetaAnalyticsServiceTier = "flex"`

    - `const BetaAnalyticsServiceTierFlexDiscount BetaAnalyticsServiceTier = "flex_discount"`

    - `const BetaAnalyticsServiceTierPriority BetaAnalyticsServiceTier = "priority"`

    - `const BetaAnalyticsServiceTierPriorityOnDemand BetaAnalyticsServiceTier = "priority_on_demand"`

    - `const BetaAnalyticsServiceTierStandard BetaAnalyticsServiceTier = "standard"`

  - `SessionIDs []string Optional` (query parameter)

    Filter to usage incurred by specific Claude Managed Agents sessions, by tagged session ID (`sesn_...`). Use `group_by[]=session_id` to break out per-session values. Claude Platform organizations only.

    maxItems: 100

  - `SlackChannelIDs []string Optional` (query parameter)

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

    maxItems: 100

  - `Speeds []BetaAnalyticsSpeed Optional` (query parameter)

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

    maxItems: 100

    - `const BetaAnalyticsSpeedFast BetaAnalyticsSpeed = "fast"`

    - `const BetaAnalyticsSpeedStandard BetaAnalyticsSpeed = "standard"`

  - `TimeBucketWidth BetaAnalyticsTimeBucketWidth Optional` (query parameter)

    Time-bucket granularity. When set, rows are returned per time bucket (one per bucket and dimension combination with usage) and each row's `starting_at` and `ending_at` are that bucket's bounds; the time bucket counts toward `limit`. `ending_at` is required when `time_bucket_width` is set, and with `time_bucket_width="1m"` the range may span at most 24 hours. When omitted, each row aggregates the requested range with `starting_at` and `ending_at` each rounded down to the hour.

  - `UserProfileIDs []string Optional` (query parameter)

    Filter to usage attributed to specific user profiles, by tagged user profile ID (`uprof_...`). Use `group_by[]=user_profile_id` to break out per-profile values. Claude Platform organizations only.

    maxItems: 100

  - `WorkspaceIDs []string Optional` (query parameter)

    Filter to usage in specific workspaces, by tagged workspace ID (`wrkspc_...`). Use `group_by[]=workspace_id` to break out per-workspace values. Claude Platform organizations only; matches nothing for a Claude Enterprise organization.

    maxItems: 100

  - `Betas []AnthropicBeta Optional` (header parameter)

    This endpoint is in beta: requests must send `analytics-usage-cost-2026-08-24` in this header.

    - `const AnthropicBetaComputerUse2024_10_22 AnthropicBeta = "computer-use-2024-10-22"`

    - `const AnthropicBetaComputerUse2025_01_24 AnthropicBeta = "computer-use-2025-01-24"`

    - `const AnthropicBetaOutput128k2025_02_19 AnthropicBeta = "output-128k-2025-02-19"`

    - `const AnthropicBetaMCPClient2025_04_04 AnthropicBeta = "mcp-client-2025-04-04"`

    - `const AnthropicBetaMCPClient2025_11_20 AnthropicBeta = "mcp-client-2025-11-20"`

    - `const AnthropicBetaDevFullThinking2025_05_14 AnthropicBeta = "dev-full-thinking-2025-05-14"`

    - `const AnthropicBetaInterleavedThinking2025_05_14 AnthropicBeta = "interleaved-thinking-2025-05-14"`

    - `const AnthropicBetaCodeExecution2025_05_22 AnthropicBeta = "code-execution-2025-05-22"`

    - `const AnthropicBetaContext1m2025_08_07 AnthropicBeta = "context-1m-2025-08-07"`

    - `const AnthropicBetaContextManagement2025_06_27 AnthropicBeta = "context-management-2025-06-27"`

    - `const AnthropicBetaModelContextWindowExceeded2025_08_26 AnthropicBeta = "model-context-window-exceeded-2025-08-26"`

    - `const AnthropicBetaFastMode2026_02_01 AnthropicBeta = "fast-mode-2026-02-01"`

    - `const AnthropicBetaOutput300k2026_03_24 AnthropicBeta = "output-300k-2026-03-24"`

    - `const AnthropicBetaUserProfiles2026_03_24 AnthropicBeta = "user-profiles-2026-03-24"`

    - `const AnthropicBetaUserProfiles2026_08_18 AnthropicBeta = "user-profiles-2026-08-18"`

    - `const AnthropicBetaUserProfiles2026_09_04 AnthropicBeta = "user-profiles-2026-09-04"`

    - `const AnthropicBetaAdvisorTool2026_03_01 AnthropicBeta = "advisor-tool-2026-03-01"`

    - `const AnthropicBetaManagedAgents2026_04_01 AnthropicBeta = "managed-agents-2026-04-01"`

    - `const AnthropicBetaDreaming2026_04_21 AnthropicBeta = "dreaming-2026-04-21"`

    - `const AnthropicBetaThinkingTokenCount2026_05_13 AnthropicBeta = "thinking-token-count-2026-05-13"`

    - `const AnthropicBetaServerSideFallback2026_06_01 AnthropicBeta = "server-side-fallback-2026-06-01"`

    - `const AnthropicBetaServerSideFallback2026_07_01 AnthropicBeta = "server-side-fallback-2026-07-01"`

    - `const AnthropicBetaFallbackCredit2026_06_01 AnthropicBeta = "fallback-credit-2026-06-01"`

    - `const AnthropicBetaFallbackCredit2026_07_01 AnthropicBeta = "fallback-credit-2026-07-01"`

    - `const AnthropicBetaAgentMemory2026_07_22 AnthropicBeta = "agent-memory-2026-07-22"`

    - `const AnthropicBetaMidConversationToolChanges2026_07_01 AnthropicBeta = "mid-conversation-tool-changes-2026-07-01"`

    - `const AnthropicBetaCompact2026_01_12 AnthropicBeta = "compact-2026-01-12"`

    - `const AnthropicBetaComputerUse2025_11_24 AnthropicBeta = "computer-use-2025-11-24"`

    - `const AnthropicBetaMCPTunnels2026_06_22 AnthropicBeta = "mcp-tunnels-2026-06-22"`

    - `const AnthropicBetaStructuredOutputs2025_11_13 AnthropicBeta = "structured-outputs-2025-11-13"`

    - `const AnthropicBetaTaskBudgets2026_03_13 AnthropicBeta = "task-budgets-2026-03-13"`

    - `const AnthropicBetaThinkingDisplayUpdates2026_08_18 AnthropicBeta = "thinking-display-updates-2026-08-18"`

    - `const AnthropicBetaMidConversationOutputConfig2026_07_01 AnthropicBeta = "mid-conversation-output-config-2026-07-01"`

    - `const AnthropicBetaThinkingBindingControls2026_08_01 AnthropicBeta = "thinking-binding-controls-2026-08-01"`

    - `const AnthropicBetaMidConversationSystemClearAt2026_08_21 AnthropicBeta = "mid-conversation-system-clear-at-2026-08-21"`

    - `const AnthropicBetaCompact2026_09_04 AnthropicBeta = "compact-2026-09-04"`

    - `const AnthropicBetaInlineTools2026_09_15 AnthropicBeta = "inline-tools-2026-09-15"`

    - `const AnthropicBetaMCPClient2026_09_15 AnthropicBeta = "mcp-client-2026-09-15"`

    - `const AnthropicBetaCEPlugins2026_09_01 AnthropicBeta = "ce-plugins-2026-09-01"`

    - `const AnthropicBetaSpendLimitReads2026_09_26 AnthropicBeta = "spend-limit-reads-2026-09-26"`

    - `const AnthropicBetaTelemetryDestinations2026_08_11 AnthropicBeta = "telemetry-destinations-2026-08-11"`

    - `const AnthropicBetaWebhooks2026_10_07 AnthropicBeta = "webhooks-2026-10-07"`

    - `const AnthropicBetaAdminUserSignOut2026_10_08 AnthropicBeta = "admin-user-sign-out-2026-10-08"`

    - `const AnthropicBetaMessageThreads2026_08_12 AnthropicBeta = "message-threads-2026-08-12"`

    - `const AnthropicBetaAnalyticsUsageCost2026_08_24 AnthropicBeta = "analytics-usage-cost-2026-08-24"`

    - `const AnthropicBetaExperimentalClaudeTag2026_10_21 AnthropicBeta = "experimental-claude-tag-2026-10-21"`

    - `const AnthropicBetaCEClaudeCodeManagedSettings2026_10_06 AnthropicBeta = "ce-claude-code-managed-settings-2026-10-06"`

    - `const AnthropicBetaEfs2026_10_01 AnthropicBeta = "efs-2026-10-01"`

    - `const AnthropicBetaUserProfilesBilling2026_10_01 AnthropicBeta = "user-profiles-billing-2026-10-01"`

    - `const AnthropicBetaMessageBatches2024_09_24 AnthropicBeta = "message-batches-2024-09-24"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaPromptCaching2024_07_31 AnthropicBeta = "prompt-caching-2024-07-31"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaPDFs2024_09_25 AnthropicBeta = "pdfs-2024-09-25"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaTokenCounting2024_11_01 AnthropicBeta = "token-counting-2024-11-01"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaTokenEfficientTools2025_02_19 AnthropicBeta = "token-efficient-tools-2025-02-19"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaFilesAPI2025_04_14 AnthropicBeta = "files-api-2025-04-14"`

      **Deprecated**: Sending this value selects the beta response shapes. Removing it moves you to the current shapes, so follow the migration steps: https://platform.claude.com/docs/en/build-with-claude/files#migrate-from-files-api-2025-04-14

    - `const AnthropicBetaExtendedCacheTTL2025_04_11 AnthropicBeta = "extended-cache-ttl-2025-04-11"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaSkills2025_10_02 AnthropicBeta = "skills-2025-10-02"`

      **Deprecated**: Sending this value selects the beta response shapes. Removing it moves you to the current shapes, so follow the migration steps: https://platform.claude.com/docs/en/build-with-claude/skills-guide#migrate-from-skills-2025-10-02

    - `const AnthropicBetaCacheDiagnosis2026_04_07 AnthropicBeta = "cache-diagnosis-2026-04-07"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

    - `const AnthropicBetaCEUserManagement2026_07_13 AnthropicBeta = "ce-user-management-2026-07-13"`

      **Deprecated**: This value is no longer needed. Remove it from your requests.

## Returns

- `type BetaAnalyticsCostItem`

  - `Cost BetaAnalyticsCostMetrics`

    Cost for this row.

    - `Amount string`

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

    - `Currency string`

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

      default: USD

    - `ListAmount string`

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

    - `Requests int64`

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

  - `EndingAt Time`

    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.

    format: date-time

  - `Group BetaAnalyticsCostGroup`

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

    - `Actor BetaAnalyticsActorUnion`

      The identity the usage is attributed to: the user if one is attributed, else the service account, else the federated (cloud-platform) identity, else the API key. Populated only when `actor` is in `group_by[]`; null for usage with no attributable identity, and for users' and federated identities' usage when the reader is a member who can see only some workspaces. Distinct identities the server cannot render also read null, each as its own row.

      - `type BetaAnalyticsReportUserActor`

        - `Type UserActor`

          Actor type. Always `"user_actor"`.

        - `Deleted bool`

          True when the account has been deleted, or when the user is no longer a member of the organization or its associated organizations (for example, their membership was removed or they were deprovisioned via your identity provider). `email_address` stays populated for removed users and is null when the account has been deleted. `name` follows the rules described on that field. The `user_id` is still populated for reconciliation.

        - `EmailAddress string`

          The user's current email address, including for users who are no longer members of the organization. Null when the account has been deleted and for system-minted service accounts.

        - `Name string`

          The user's current full name. Null when the user has not set one. `"Deleted User"` when the account has been deleted, or when the user is no longer a member and the organization hides removed users' names.

        - `UserID string`

          Tagged user ID.

      - `type BetaAnalyticsServiceAccountActor`

        - `Type ServiceAccountActor`

        - `ServiceAccountID string`

          Tagged service account ID.

      - `type BetaAnalyticsFederatedActor`

        - `Type FederatedActor`

        - `Provider BetaAnalyticsFederatedActorProviderUnion`

          The trusted provider that asserted the caller's identity.

          - `type BetaAnalyticsFederatedActorAWSProvider`

            - `Type AWS`

            - `AccountID string`

              The AWS account the organization is bound to.

            - `SignedPrincipal string`

              The AWS-signed ARN of the IAM principal that made the requests.

          - `type BetaAnalyticsFederatedActorAzureProvider`

            - `Type Azure`

            - `SubscriptionID string`

              The Azure subscription the organization is bound to.

          - `type BetaAnalyticsFederatedActorGCPProvider`

            - `Type GCP`

            - `ProjectNumber string`

              The Google Cloud project the organization is bound to.

          - `type BetaAnalyticsFederatedActorOIDCProvider`

            - `Type OIDC`

            - `Issuer string`

              The federation issuer's URL.

        - `Subject string`

          The provider's identifier for the caller: on `aws`, the IAM principal ARN (one role is one actor across its sessions); on `gcp`, the caller's IAM principal identifier as Google Cloud reports it, such as `serviceAccount:<email>`, `user:<email>`, or a `principal://...` URI.

      - `type BetaAnalyticsAPIActor`

        - `Type APIActor`

        - `APIKeyID string`

          Tagged API key ID.

    - `ActorType BetaAnalyticsActorType`

      Kind of identity the usage is attributed to; matches `actor.type` when `actor` is set. Populated only when `actor_type` is in `group_by[]`.

      - `const BetaAnalyticsActorTypeAPIActor BetaAnalyticsActorType = "api_actor"`

      - `const BetaAnalyticsActorTypeFederatedActor BetaAnalyticsActorType = "federated_actor"`

      - `const BetaAnalyticsActorTypeServiceAccountActor BetaAnalyticsActorType = "service_account_actor"`

      - `const BetaAnalyticsActorTypeUserActor BetaAnalyticsActorType = "user_actor"`

    - `AgentID string`

      Claude Managed Agents agent whose session incurred the usage. Populated only when `agent_id` is in `group_by[]`; null for usage outside a managed session.

    - `APIKeyID string`

      API key that authenticated the requests, as a tagged API key ID, whichever identity `actor` resolves to. Populated only when `api_key_id` is in `group_by[]`; null for usage not authenticated by an API key.

    - `ClaudeTagCategory BetaAnalyticsClaudeTagCategory`

      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. New categories may be added over time.

      - `const BetaAnalyticsClaudeTagCategoryDm BetaAnalyticsClaudeTagCategory = "dm"`

      - `const BetaAnalyticsClaudeTagCategoryEngaged BetaAnalyticsClaudeTagCategory = "engaged"`

      - `const BetaAnalyticsClaudeTagCategoryMonitoring BetaAnalyticsClaudeTagCategory = "monitoring"`

      - `const BetaAnalyticsClaudeTagCategoryProactive BetaAnalyticsClaudeTagCategory = "proactive"`

      - `const BetaAnalyticsClaudeTagCategoryScheduled BetaAnalyticsClaudeTagCategory = "scheduled"`

    - `ClaudeTagUserID 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.

    - `ContextWindow BetaAnalyticsContextWindow`

      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.

      - `const BetaAnalyticsContextWindowFrom0To200k BetaAnalyticsContextWindow = "0-200k"`

      - `const BetaAnalyticsContextWindowFrom200kTo1M BetaAnalyticsContextWindow = "200k-1M"`

    - `CostType BetaAnalyticsGroupedCostType`

      Cost component breakdown; null when returning the combined total.

      - `const BetaAnalyticsGroupedCostTypeCodeExecution BetaAnalyticsGroupedCostType = "code_execution"`

      - `const BetaAnalyticsGroupedCostTypeSessionUsage BetaAnalyticsGroupedCostType = "session_usage"`

      - `const BetaAnalyticsGroupedCostTypeTokens BetaAnalyticsGroupedCostType = "tokens"`

      - `const BetaAnalyticsGroupedCostTypeWebSearch BetaAnalyticsGroupedCostType = "web_search"`

    - `DeploymentID string`

      Deployment that started the Claude Managed Agents session. Populated only when `deployment_id` is in `group_by[]`; null for usage outside a managed session and for sessions no deployment started.

    - `EnvironmentID string`

      Claude Managed Agents environment the session ran in. Populated only when `environment_id` is in `group_by[]`; null for usage outside a managed session.

    - `InferenceGeo BetaAnalyticsUsageCostInferenceGeo`

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

      - `const BetaAnalyticsUsageCostInferenceGeoGlobal BetaAnalyticsUsageCostInferenceGeo = "global"`

      - `const BetaAnalyticsUsageCostInferenceGeoUs BetaAnalyticsUsageCostInferenceGeo = "us"`

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

    - `OrganizationID string`

      UUID of the child organization the usage belongs to, on a parent organization's report across its children. Null unless `organization_id` is in `group_by[]`.

    - `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`, `claude_tag`, and `chat_cowork_unified`. `claude_tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only where Chat and Cowork unified is available. `cc_security_autopatch` is work that Claude Security runs for the organization. Some unattributed usage is reported as "other".

    - `RBACGroupID 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[]`.

    - `ServiceTier BetaAnalyticsServiceTier`

      Service tier the usage was served at. Populated only when `service_tier` is in `group_by[]`; null for usage with no service tier (for example, code execution) and for Claude Enterprise usage.

      - `const BetaAnalyticsServiceTierBatch BetaAnalyticsServiceTier = "batch"`

      - `const BetaAnalyticsServiceTierFlex BetaAnalyticsServiceTier = "flex"`

      - `const BetaAnalyticsServiceTierFlexDiscount BetaAnalyticsServiceTier = "flex_discount"`

      - `const BetaAnalyticsServiceTierPriority BetaAnalyticsServiceTier = "priority"`

      - `const BetaAnalyticsServiceTierPriorityOnDemand BetaAnalyticsServiceTier = "priority_on_demand"`

      - `const BetaAnalyticsServiceTierStandard BetaAnalyticsServiceTier = "standard"`

    - `SessionID string`

      Claude Managed Agents session that incurred the usage. Populated only when `session_id` is in `group_by[]`; null for usage outside a managed session.

    - `SlackChannelID string`

      Slack channel the usage originated from. Populated only when `slack_channel_id` is in `group_by[]`; null for usage outside Slack, for some Claude Tag usage that has no channel recorded, and for usage recorded before channel attribution was enabled.

    - `Speed BetaAnalyticsSpeed`

      Inference speed mode of the usage or cost: `fast` or `standard`. Null unless `speed` is in `group_by[]`.

      - `const BetaAnalyticsSpeedFast BetaAnalyticsSpeed = "fast"`

      - `const BetaAnalyticsSpeedStandard BetaAnalyticsSpeed = "standard"`

    - `TokenType BetaAnalyticsTokenType`

      Token type when `cost_type` is `tokens`; null otherwise.

      - `const BetaAnalyticsTokenTypeCacheCreationEphemeral1hInputTokens BetaAnalyticsTokenType = "cache_creation.ephemeral_1h_input_tokens"`

      - `const BetaAnalyticsTokenTypeCacheCreationEphemeral5mInputTokens BetaAnalyticsTokenType = "cache_creation.ephemeral_5m_input_tokens"`

      - `const BetaAnalyticsTokenTypeCacheReadInputTokens BetaAnalyticsTokenType = "cache_read_input_tokens"`

      - `const BetaAnalyticsTokenTypeOutputTokens BetaAnalyticsTokenType = "output_tokens"`

      - `const BetaAnalyticsTokenTypeUncachedInputTokens BetaAnalyticsTokenType = "uncached_input_tokens"`

    - `UserProfileID string`

      User profile the usage was attributed to, as a tagged `uprof_` ID. Populated only when `user_profile_id` is in `group_by[]`; null for usage that named no profile and for Claude Enterprise usage.

    - `WorkspaceID string`

      Workspace the usage occurred in, as a tagged workspace ID, including the organization's default workspace. Populated only when `workspace_id` is in `group_by[]`; null for Claude Enterprise usage.

  - `StartingAt Time`

    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.

    format: date-time

## Example

```go
package main

import (
	"context"
	"fmt"
	"time"

	"github.com/anthropics/anthropic-sdk-go/v2"
	"github.com/anthropics/anthropic-sdk-go/v2/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	page, err := client.Beta.Organization.Analytics.Cost.List(context.TODO(), anthropic.BetaOrganizationAnalyticsCostListParams{
		StartingAt: time.Now(),
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", page)
}
```

### Response (200)

```json
{
  "data": [
    {
      "cost": {
        "amount": "41280.000000",
        "currency": "USD",
        "list_amount": "51600.000000",
        "requests": 128
      },
      "ending_at": "2026-10-01T00:00:00Z",
      "group": {
        "actor": {
          "deleted": false,
          "email_address": "user@emaildomain.com",
          "name": "Jane Doe",
          "type": "user_actor",
          "user_id": "user_01WxYzAbCdEfGhJkMnPqRsTu"
        },
        "actor_type": "user_actor",
        "agent_id": "agent_01VHd3EAGJ6PLkP9LM7DDu3f",
        "api_key_id": "apikey_01Rj2N8SVvo6BePZj99NhmiT",
        "claude_tag_category": "dm",
        "claude_tag_user_id": "U0123ABCDEF",
        "context_window": "0-200k",
        "cost_type": "tokens",
        "deployment_id": "depl_01JFC6ihzZHtAuyHsaENdJhY",
        "environment_id": "env_017oTjuGedHtjhJauVC5xGJD",
        "inference_geo": "global",
        "model": "claude-opus-5-5",
        "organization_id": "12345678-1234-5678-1234-567812345678",
        "product": "chat",
        "rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
        "service_tier": "standard",
        "session_id": "sesn_0187kPDyNCwibNNvfaPEApCJ",
        "slack_channel_id": "C0123ABCDEF",
        "speed": "fast",
        "token_type": "cache_creation.ephemeral_1h_input_tokens",
        "user_profile_id": "uprof_01M33NeYUQK2WV9PpYcsPHLi",
        "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
      },
      "starting_at": "2026-09-01T00:00:00Z"
    }
  ],
  "data_refreshed_at": "2026-10-01T04:02:11Z",
  "has_more": true,
  "next_page": "next_page"
}
```
