Open-Sourcing runcost: A Comprehensive Tool for Tracking LLM API Costs

pawofdoom · reddit · 2026-07-31

Tracking token usage and calculating costs across various LLM APIs can be tedious for developers. The author shares runcost, an open-source library they built (available via npm install runcost).

The tool is designed to handle the pricing logic, formats, and edge cases of almost every provider automatically, without requiring constant manual price updates. The author is reaching out to the community to see if there are other common, off-the-shelf solutions being used for this problem.

Original post →

More from coding & agent

coding & agent channel →