News for hackers. Stuff that matters.
Re:Ask HN: How are you estimating API costs before committin... by gdhaliwal23 on Monday March 16, 2026 @02:44AM (#47395801)
You're right that Langfuse and Helicone are retrospective — they show traces but don't roll up to "feature X costs $0.12/invocation." A middle ground that's worked: tag every API call with a feature ID during prototype runs and compute per-call cost from token counts using current pricing. Within a day or two of testing you have a real cost distribution per feature — enough to decide if the architecture is viable before building it out fully. We open-sourced the cost calculation part: `ai-cost-calc` on PyPI (https://pypi.org/project/ai-cost-calc/).

There are no comments on this comment yet.