Usage API
Inspect your tenant's usage summary, cost rollups, and recent runs, with per-agent reporting for individual agents.
Use the Usage API to see aggregate run usage, estimated cost rollups, learning operation counts, and recent run history for your own tenant.
Access control
Usage endpoints require the usage:read scope. Data is tenant-scoped through row-level security. See Access control (FGA and RBAC).
Lead with the default tenant view
Start with the no-query-params version first. Add filters only when you need them.
Own-tenant endpoints
GET /usage/summary
No query params are required.
curl -H "Authorization: Bearer <API_KEY>" \
"https://api.hyperstruck.com/usage/summary"Prop
Type
Required scope: usage:read
The summary response includes:
Prop
Type
GET /usage/runs
No query params are required.
curl -H "Authorization: Bearer <API_KEY>" \
"https://api.hyperstruck.com/usage/runs"Prop
Type
Required scope: usage:read
Run list responses include tenant_id, window, period_start, period_end_exclusive, items, and next_cursor. Each item is a billing-safe projection with IDs, status, worker profile, timestamps, compute seconds, and estimated cost fields. Items intentionally omit goal, metadata, and error.
Per-agent usage
GET /agents/{agent_id}/usage/summary
Returns usage aggregates for one agent.
curl -H "Authorization: Bearer <API_KEY>" \
"https://api.hyperstruck.com/agents/<AGENT_ID>/usage/summary"Prop
Type
The response includes agent_id, window, period_start, period_end_exclusive, and agent_runs aggregates with run counts by status, session count, compute totals, and estimated cost rollups.
Required scope: usage:read
Common next knobs
- Use
windowto switch from the defaultlast_7_daysview. Valid values arelast_7_days,last_30_days,calendar_quarter, andcalendar_year. - Use
limitandcursorwhen paging through run history. - Use
as_ofwhen you want a report anchored to a specific point in time. - Use
include_summary=trueonGET /agentswhen you want per-agent usage summaries in the agent inventory.
Related pages
- Access control (FGA and RBAC) for scope requirements
- Quickstart for the first agent flow
- Agents API for the endpoints that create runs
- Plans API for directly inspecting prior workflow matches
- Learnings API for manual learning operations that may appear in usage reporting