Get Costs By Tag
Aggregate cost data grouped by allocation tag or by adapter.
The endpoint serves three callers:
- Web GUI (Costs.tsx adapter table) - calls GET /costs/by-tag and expects an array of {adapter, calls, tokens, cost_usd, share_pct, delta_7d_pct} rows. With shape=auto (default) and no tag_key, this is what we return.
- Legacy callers passing tag_key=… - receive the existing {by_tag: {key: {value: cost}}} envelope.
- Legacy callers wanting the envelope explicitly - pass shape=tags and get the envelope without supplying a key.
The hours parameter controls the GUI window (default 24h).
get/costs/by-tag
Request
- Base URL: http://127.0.0.1:8052
- URL: http://127.0.0.1:8052/costs/by-tag
- Auth: none declared
Query parameters
tag_keystring nullable
hoursinteger
shapestring
Response
Successful Response
unknown required
Changes
No recorded changes to this operation across all 1 revision of this API.