Get Messages Usage Report
GET/v1/organizations/usage_report/messages
Get Messages Usage Report
Query Parameters
starting_at: string
Time buckets that start on or after this RFC 3339 timestamp will be returned. Each time bucket will be snapped to the start of the minute/hour/day in UTC.
api_key_ids: optional array of string
Restrict usage returned to the specified API key ID(s).
ending_at: optional string
Time buckets that end before this RFC 3339 timestamp will be returned.
models: optional array of string
Restrict usage returned to the specified model(s).
page: optional string
Optionally set to the next_page token from the previous response.
workspace_ids: optional array of string
Restrict usage returned to the specified workspace ID(s).
Header Parameters
Returns
Get Messages Usage Report
curl https://api.anthropic.com/v1/organizations/usage_report/messages \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"