API Reference
Usage
Retrieve organization and API key usage summaries.
GET
/v1/usageOptionally include days to specify a usage lookback window.
curl "https://<gateway-host>/v1/usage?days=30" \
-H "Authorization: Bearer $DISRUPTIVERAIN_CLIENT_ID:$DISRUPTIVERAIN_CLIENT_SECRET"Response
The response includes organization-wide usage totals and optional per-key summaries.
{
"orgId": "org_123",
"usage": {
"quotas": [
{ "label": "Tokens", "used": 120000, "limit": 200000, "unit": "tokens" }
],
"totals": [
{ "label": "Requests", "value": 4200 }
],
"timeSeries": [
{
"label": "Tokens",
"data": [
{ "date": "2024-01-01", "value": 1200 },
{ "date": "2024-01-02", "value": 1500 }
]
}
]
},
"apiKeyUsage": {
"apiKeyId": "key_123",
"month": "2024-01-01T00:00:00.000Z",
"totalTokens": 32000,
"requestCount": 780
}
}Was this page helpful?