Tokencost
Lightweight open-source library maintaining an up-to-date price table for estimating prompt/completion costs across 400+ models.
| Category | Cost & FinOps |
| Open source | Yes |
| Self-hostable | Yes |
| Pricing model | free |
| Pricing notes | MIT Python library; no commercial tier |
| Framework integrations | openai-sdk, anthropic, litellm |
| Funding / ownership | Maintained by AgentOps |
| GitHub stars | 1,983 |
| Maintenance | slow (2025-09-05) |
| License (GitHub) | MIT |
| Open issues | 28 |
| Maturity signal | 61/100 (Established) — computed from public GitHub signals, see methodology |
Pricing/feature source: https://github.com/AgentOps-AI/tokencost
Maturity signal is computed from public GitHub data only. How it is calculated.
Frequently asked questions
Is Tokencost open source?
Yes. Licensed under MIT.
Can I self-host Tokencost?
Yes — Tokencost can run in your own infrastructure.
How much does Tokencost cost?
Free. MIT Python library; no commercial tier