Re:Ask HN: How are people forecasting AI API costs for agent...
by gdhaliwal23 on Monday March 16, 2026 @02:43AM
(#47395797)
Tag every API call with a customer ID and feature name, then compute cost per call from token counts against current model pricing. That gives you per-customer cost attribution instead of just an aggregate bill. Budget caps per customer bound the risk — a runaway loop hits the cap instead of your margin. We built this as MarginDash (https://margindash.com) — the cost calculation piece is also available as a free open-source SDK if you just want that part.
[ Parent
| on HN ]
There are no comments on this comment yet.