v1

latestOpenAPI 3.1.02026-08-046031.9 KB
Team Management

Get API Key Usage

Retrieves usage analytics and billing data for a specific API key over a given time period. Returns cost breakdown by price type from the billing system.

get/api-keys/{id}/usage

Path parameters

idstring required

The unique identifier of the API key.

Query parameters

start_datestring date-time

Start date for the usage period (ISO 8601 format). Defaults to 30 days ago. Must be within the last 6 months (180 days).

end_datestring date-time

End date for the usage period (ISO 8601 format). Defaults to current time.

group_by'hour' | 'day' | 'month'

Time granularity for grouping results. Currently reserved for future enhancements and does not change the response shape. Defaults to 'day'.

Response

Usage data retrieved successfully

idstring

The unique identifier of the API key.

api_key_idstring uuid

The API key ID.

api_key_namestring nullable

The name of the API key

team_idstring uuid

The team ID this key belongs to

total_cost_usdnumber

Total cost in USD for the period

Example response

{
  "total_cost_usd": 45.67
}