Usage summary statistics
API Reference
Usage Analytics
Monitor API key usage and request metrics (production traffic only — sandbox nex_test_ rows excluded)
GET
Usage summary statistics
All
/api/api-usage/* endpoints aggregate non-sandbox usage only. Requests made with nex_test_ keys still log rows with is_sandbox = true, but those rows are not included in summary, timeseries, by-agent, by-tool, by-key, or outcome totals.
See Sandbox (test API keys) for how test keys isolate data elsewhere.
Operator UI
- Facility dashboard:
/admin/api-usage— requiresanalytics.view; passfacilityIdfor keys scoped to that facility. - Internal platform dashboard:
/admin/platform-usage— cross-facility totals (facilityIdomitted) for internal operators only; same JSON endpoints and CSV export (GET /api/api-usage/export).
Authorizations
Session-based authentication cookie
Query Parameters
When set, restrict aggregates to API keys with this api_keys.facility_id. Required for facility-scoped sessions that are not internal cross-facility operators. Omit for platform-wide totals (internal operators only).
Lookback period in days