latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-14485121706.3 KB

d52fab9681ed

Get Cost Current

Return real-time cost snapshot for the active run + GUI rollups.

Updated after each agent completion. Designed for TUI sidebar polling and lightweight dashboard widgets. Returns per-model input/output/cache token breakdown alongside spend and budget status.

Web GUI (Costs.tsx §6.05) consumes the additive today_usd, week_usd, projected_month_usd, budget_usd, used_pct, prior_week_usd, delta_hour_usd, resets_at and last_sync_at fields. Existing TUI/CLI callers keep reading spent_usd / percentage_used etc. unchanged.

Scope: every figure here is the caller's tenant's, not the run's or the deployment's - spend is replayed from the caller's scope only, and the cap it is measured against is that tenant's configured cap where one is configured. tenant_id in the response names the scope, so a client aggregating across tenants can tell these apart from run-wide totals.

get/costs/current

Response

Successful Response

{"stackTrail":"paths:/costs/current:get:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}