用量
Get Token Usage By Dimension
GET/v1/organizations/analytics/usage
Get token usage across a date range, broken out by dimension.
Models
BetaAnalyticsUsageGroup object{ actor, actor_type, agent_id, 16 more }The dimension values one usage row is broken out by; each is null
unless its dimension is in group_by[].
BetaAnalyticsUsageGroup object{ actor, actor_type, agent_id, 16 more }
The dimension values one usage row is broken out by; each is null
unless its dimension is in group_by[].
BetaAnalyticsUsageGroupBy = "actor" or "actor_type" or "agent_id" or 16 more
BetaAnalyticsUsageGroupBy = "actor" or "actor_type" or "agent_id" or 16 more
One of the following:
"actor"
"actor_type"
"agent_id"
"api_key_id"
"claude_tag_category"
"claude_tag_user_id"
"context_window"
"deployment_id"
"environment_id"
"inference_geo"
"model"
"product"
"rbac_group_id"
"service_tier"
"session_id"
"slack_channel_id"
"speed"
"user_profile_id"
"workspace_id"
BetaAnalyticsUsageItem object{ ending_at, group, starting_at, usage }
BetaAnalyticsUsageItem object{ ending_at, group, starting_at, usage }
BetaAnalyticsUsageMetrics object{ cache_creation, cache_read_input_tokens, output_tokens, 4 more }The token usage of one row.
BetaAnalyticsUsageMetrics object{ cache_creation, cache_read_input_tokens, output_tokens, 4 more }
The token usage of one row.
BetaAnalyticsUsageOrderBy = "output_tokens" or "requests" or "time" or 2 more
BetaAnalyticsUsageOrderBy = "output_tokens" or "requests" or "time" or 2 more
One of the following:
"output_tokens"
"requests"
"time"
"total_tokens"
"uncached_input_tokens"