Get API key usage
API Keys
Get API key usage
Returns usage statistics for a specific API key
GET
Get API key usage
Includes request counts, token counts, and cost.
Requires
keys:read or usage:read scope. Naturally idempotent.
All parameters, request/response schemas, and examples are auto-generated from the OpenAPI specification.Authorizations
API key authentication.
Keys start with ak_ prefix.
Example: Authorization: Bearer ak_live_xxxxxxxxxxxx
Path Parameters
Workspace identifier
API key identifier
Query Parameters
Usage aggregation period
Available options:
day, week, month Response
OK
Usage statistics for an API key.
API key identifier
Workspace identifier
Aggregation period (e.g. day, week, month)
Period start date
Period end date
Total requests made with this key
Number of failed requests
Number of rate-limited requests
Total input tokens
Total output tokens
Total tokens (input + output)
Total cost in USD