Usage API
API usage rollups and performance metrics for the calling organization and key.
Usage API
Get Usage Summary
GET /api/v1/usage
Query Params
days(1-90, default 30)
Response
{
"windowDays": 30,
"since": "2026-01-19T00:00:00.000Z",
"summary": {
"requests": 120,
"errors": 4,
"estimatedCostUsd": "3.420000",
"avgResponseMs": 182
},
"currentKey": {
"id": "uuid",
"name": "production",
"requestsToday": 32,
"rateLimitPerMinute": 60,
"currentMonthCostUsd": "3.42",
"monthlyCostLimitUsd": "100.00",
"status": "active",
"lastRequestAt": "2026-08-04T18:25:00.000Z",
"environment": "live"
},
"byEndpoint": [
{
"path": "/api/v1/jobs",
"requests": 60,
"errors": 2,
"avgResponseMs": 140,
"estimatedCostUsd": "1.250000"
}
]
}Use Cases
- partner rate/cost visibility
- endpoint-level performance monitoring
- operational capacity planning
Usage is scoped to the calling organization. currentKey describes only the API key used for the request, and byEndpoint is capped to the top 50 paths in the selected window.
currentKey is null only when the authenticated key row is no longer
available during the request. lastRequestAt can also be null for an unused
key.