取得每位使用者的成本
GET/v1/organizations/analytics/user_cost_report
[舊版] 取得某個日期範圍內每位使用者的成本(以美元計)。
傳回每位使用者的成本,依支出排名;group_by[] 或 bucket_width 會將一位使用者拆分為多列。使用此端點查看哪些使用者產生最多成本。僅包含歸屬於使用者帳戶的成本,因此未歸屬於任何使用者帳戶的成本(例如 Code Review 用量以及 Slack 頻道中的 Claude Tag 用量)不會包含在內。Claude Tag 一對一私訊會包含在內,其產品為 claude-tag,但僅限已連結 Claude 帳戶的成員。適用於採用 Claude Enterprise 方案的組織。需要具有 read:analytics 範圍的 API 金鑰。
此端點屬於舊版的 Claude Enterprise 用量與成本報告。新的整合請改用用量與成本分析 API 中的 GET /v1/organizations/analytics/cost。若要遷移現有整合,請參閱從 Claude Enterprise 用量與成本報告遷移。
Query parameters
Headers
Returns
取得每位使用者的成本
curl https://api.anthropic.com/v1/organizations/analytics/user_cost_report \
-H 'anthropic-version: 2026-10-21' \
-H "Authorization: Bearer $ANTHROPIC_API_KEY"Response 200
{
"data": [
{
"actor": {
"deleted": true,
"email_address": "jane@example.com",
"name": "Jane Smith",
"type": "user_actor",
"user_id": "user_01AbCdEfGhIjKlMnOpQrSt"
},
"amount": "41280.000000",
"claude_tag_category": "dm",
"claude_tag_user_id": "U0123ABCDEF",
"context_window": "0-200k",
"cost_type": "code_execution",
"currency": "USD",
"ending_at": "2019-12-27T18:11:19.117Z",
"inference_geo": "global",
"list_amount": "51600.000000",
"model": "claude-opus-5-5",
"product": "chat",
"rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
"requests": 128,
"slack_channel_id": "C0123ABCDEF",
"speed": "fast",
"starting_at": "2019-12-27T18:11:19.117Z",
"token_type": "cache_creation.ephemeral_1h_input_tokens"
}
],
"data_refreshed_at": "2019-12-27T18:11:19.117Z",
"has_more": true,
"next_page": "next_page",
"organization_id": "org_013FP9SaFPBg7Kw7fetjn6cF"
}Returns Examples
Response 200
{
"data": [
{
"actor": {
"deleted": true,
"email_address": "jane@example.com",
"name": "Jane Smith",
"type": "user_actor",
"user_id": "user_01AbCdEfGhIjKlMnOpQrSt"
},
"amount": "41280.000000",
"claude_tag_category": "dm",
"claude_tag_user_id": "U0123ABCDEF",
"context_window": "0-200k",
"cost_type": "code_execution",
"currency": "USD",
"ending_at": "2019-12-27T18:11:19.117Z",
"inference_geo": "global",
"list_amount": "51600.000000",
"model": "claude-opus-5-5",
"product": "chat",
"rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
"requests": 128,
"slack_channel_id": "C0123ABCDEF",
"speed": "fast",
"starting_at": "2019-12-27T18:11:19.117Z",
"token_type": "cache_creation.ephemeral_1h_input_tokens"
}
],
"data_refreshed_at": "2019-12-27T18:11:19.117Z",
"has_more": true,
"next_page": "next_page",
"organization_id": "org_013FP9SaFPBg7Kw7fetjn6cF"
}