GoldRush Usage API Now Available
You can now pull your GoldRush account usage programmatically. A newusage endpoint returns the same three datasets the Platform Usage page renders — daily usage, aggregate credit consumption against your plan, and a per-API-key breakdown — as JSON, filterable by time range.
Filter with a rolling
duration (1, 3, 6, or 12 months; default 1 = month-to-date) or an explicit from/to window. Every section is computed over that one window (period). The endpoint is authenticated with service keys (account-scoped), distinct from your standard GoldRush API keys.
What this unlocks
- Budget guardrails in code — watch
aggregate.credits_consumedagainstmax_credits(andflex_credits.limit) to alert or throttle before you hit the ceiling. - Per-key cost attribution — use
by_api_keyto split spend across projects, environments, or downstream customers for chargeback and show-back. - Usage trends & anomaly detection — feed
by_day(premium vs. free) into your own BI/observability stack to forecast month-end spend and catch runaway jobs. - Agent self-governance — let autonomous agents read their own burn rate and premium/free mix, then throttle or switch plans programmatically.
GET https://api.covalenthq.com/platform/usage/?duration=1 with a service key (add from/to for an explicit window), or goldrush usage --duration 1 --by-key via the CLI. Response is a {data:{...}} envelope.
→ Read the docs