costs resource is read-mostly. You ask it for roll-ups at
a scope (company, team, agent, project, task, or run) and it
returns spend in USD and in tokens, plus a breakdown by
category.
Writes to the cost table come from the orchestrator, not from
the API. You cannot POST a cost entry; the orchestrator captures
them automatically. You can, however, correct or annotate a
cost entry via the admin endpoints if you have the scope for it.
Endpoints
| Method | Path | Purpose |
|---|---|---|
GET | /v1/companies/{cid}/costs | Company-level roll-up |
GET | /v1/companies/{cid}/costs/teams/{tid} | Team-level roll-up |
GET | /v1/companies/{cid}/costs/agents/{aid} | Agent-level roll-up |
GET | /v1/companies/{cid}/costs/projects/{pid} | Project-level roll-up |
GET | /v1/companies/{cid}/costs/issues/{iid} | Task-level roll-up |
GET | /v1/companies/{cid}/costs/runs/{rid} | Run-level detail |
GET | /v1/companies/{cid}/costs/entries | Raw cost entries (admin) |
GET | /v1/companies/{cid}/costs/forecast | Spend forecast to end of period |
GET | /v1/companies/{cid}/costs/export | Export cost data |
POST | /v1/companies/{cid}/costs/topup | Move reserve into a team envelope |
POST | /v1/companies/{cid}/costs/adjust | Admin cost adjustment |
The roll-up object
Time windows
Every roll-up endpoint takessince and until parameters:
since— start of the current fiscal perioduntil— now
- Absolute ISO:
2026-04-11T00:00:00Z - Relative:
1h,24h,7d,30d - Named:
today,yesterday,this_week,this_month,this_quarter
Raw cost entries
For everything else (custom dashboards, per-tool analysis, anomaly detection), pull raw entries:adjust entry that offsets it.
Forecast
The forecast endpoint projects spend to end of period based on the recent run rate:Top-ups
Move reserve budget into a team envelope that is about to breach:Adjustments
For admin-only corrections (vendor refund, pricing error, billing dispute), post an adjustment:usd
field. They show up in audit and cannot be silently removed.
Export
For spreadsheets, external dashboards, or long-term archives:csv, jsonl, parquet. The parquet export is the
most efficient for long periods.
Webhooks
| Event | When |
|---|---|
cost.breach.soft | Soft breach on any envelope |
cost.breach.hard | Hard breach on any envelope |
cost.breach.catastrophic | Process killed for spend rate |
cost.topup | Top-up executed |
cost.adjust | Admin adjustment posted |
Next
- Budgets and costs (guide) for the operator-side view of the same data
- Activity — where breach events show up
- Companies — the top-level scope for all cost roll-ups