Claude Platform Docs

コスト

ディメンション別のコストを取得
$client->beta->organization->analytics->cost->list(\Datetime startingAt, ?list<string> actorIDs, ?list<AnalyticsActorType> actorTypes, ?list<string> agentIDs, ?list<string> apiKeyIDs, ?list<AnalyticsClaudeTagCategory> claudeTagCategories, ?list<string> claudeTagUserIDs, ?list<AnalyticsContextWindow> contextWindows, ?list<string> deploymentIDs, ?\Datetime endingAt, ?list<string> environmentIDs, ?bool excludeDeletedUsers, ?list<BetaAnalyticsCostGroupBy> groupBy, ?list<AnalyticsInferenceGeoFilter> inferenceGeos, ?int limit, ?list<string> models, ?AnalyticsUsageCostSortOrder order, ?BetaAnalyticsCostOrderBy orderBy, ?string page, ?list<AnalyticsUsageCostProductFilter> products, ?list<string> rbacGroupIDs, ?list<AnalyticsServiceTier> serviceTiers, ?list<string> sessionIDs, ?list<string> slackChannelIDs, ?list<AnalyticsSpeed> speeds, ?AnalyticsTimeBucketWidth timeBucketWidth, ?list<string> userProfileIDs, ?list<string> workspaceIDs, ?list<AnthropicBeta> betas): ReportPageCursor<BetaAnalyticsCostItem>
GET/v1/organizations/analytics/cost
Requires anthropic-beta: analytics-usage-cost-2026-08-24. How to send beta headers

指定した日付範囲におけるUSD建てのコストを、ディメンション別に分けて取得します。

Models
class BetaAnalyticsCostGroup { $actor; $actorType; $agentID; /* 18 more */ }
One of the following:
"actor"
"actor_type"
"agent_id"
"api_key_id"
"claude_tag_category"
"claude_tag_user_id"
"context_window"
"cost_type"
"deployment_id"
"environment_id"
"inference_geo"
"model"
"product"
"rbac_group_id"
"service_tier"
"session_id"
"slack_channel_id"
"speed"
"token_type"
"user_profile_id"
"workspace_id"
class BetaAnalyticsCostItem { $cost; $endingAt; $group; $startingAt; }

Cost for this row.

\Datetime 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.

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

\Datetime 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.

class BetaAnalyticsCostMetrics { $amount; $currency; $listAmount; $requests; }
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.

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

One of the following:
"amount"
"list_amount"
"time"