AgentOps-AI/tokencost
Easy token price estimates for 400+ LLMs. TokenOps. observed · 2026-08-28
Health v2 · maintenance only
47/100
- Activity 40
- Release rhythm 42
- Longevity 71
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 16.5
- age_days: 1004
- days_rel: 385
- days_push: 362
- n_releases_24m: 13
Adoption not part of the score
2004 stars · 106 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A Python library that estimates the USD cost of LLM API calls by counting tokens for prompts and completions across 400+ models. It maintains up-to-date pricing data for major providers like OpenAI and Anthropic.
Use cases
- estimate the cost of an OpenAI API call before sending it
- count tokens in a prompt for gpt-3.5-turbo
- track LLM pricing across 400+ models
- calculate USD cost of prompts and completions in an AI agent
- budget monitoring for LLM applications
When to choose
- you need clientside token counting and cost estimation without API round-trips
- you want a lightweight single-function API for cost calculation
- you build AI agents and need to track spend per model
When to avoid
- you need full LLM observability, tracing, and debugging rather than just cost math
- you need exact billing figures from the provider rather than estimates
- your stack is not Python
Facets
library · maturity active
analytics monitoring sdk large-language-models artificial-intelligence analytics python cli token-counting cost-estimation llm-pricing openai anthropic ai-agents
4 sources
- readme: https://github.com/AgentOps-AI/tokencost · fetched 2026-08-28 · 51a930ebd109
- homepage: https://agentops.ai · fetched 2026-08-29 · cf2bd381c35b
- site_page: https://docs.agentops.ai · fetched 2026-08-29 · 1caf236089e3
- registry_pypi: https://pypi.org/pypi/tokencost/json · fetched 2026-08-29 · 480d0241314f
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| AgentOps-AI/tokencost | main | 47 |
For agents
markdown · JSON · MCP: product_card(name="AgentOps-AI/tokencost")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem