{"adoption": {"forks": 106, "observed_at": "2026-08-28T04:06:04.606647+00:00", "stars": 2004}, "canonical_url": "https://ross.abutalabs.com/products/tokencost", "card": {"archived": false, "artifact_type": "library", "description": "Easy token price estimates for 400+ LLMs. TokenOps.", "domain": ["large-language-models", "artificial-intelligence", "analytics"], "enriched": true, "function": ["analytics", "monitoring", "sdk"], "health_score": 58, "homepage": "https://agentops.ai", "language": "Python", "license": "MIT", "license_family": "permissive", "maturity": "active", "member_repos": ["AgentOps-AI/tokencost"], "name": "AgentOps-AI/tokencost", "platform": ["python", "cli"], "pushed_at": "2025-09-05T08:10:10+00:00", "repo": "AgentOps-AI/tokencost", "stars": 2004, "tags": ["token-counting", "cost-estimation", "llm-pricing", "openai", "anthropic", "ai-agents"], "topics": ["analytics", "claude", "large-language-models", "llm", "observability", "openai", "price", "price-tracker", "token", "tokenization"], "urls": [], "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"], "what_it_is": "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.", "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"], "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"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/tokencost", "repo": "AgentOps-AI/tokencost", "role": "main", "score": 47}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:06:04.606647+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-30T03:01:35.437000+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "51a930ebd109e5e30bcf2e85eacdb60490b18ae5d82a43888faa7c1d2e224838", "fetched_at": "2026-08-28T04:06:04.606647+00:00", "kind": "readme", "missing": false, "url": "https://github.com/AgentOps-AI/tokencost"}, {"content_hash": "cf2bd381c35b80343e135f4f1d29fdf2d14c5f9e6f317126accecfaf155a8a09", "fetched_at": "2026-08-29T10:41:30.505831+00:00", "kind": "homepage", "missing": false, "url": "https://agentops.ai"}, {"content_hash": "1caf236089e32cdf973b4af5b1c1f16ac1161e8a2a4a517d68924775c7ec9bf8", "fetched_at": "2026-08-29T10:41:30.515498+00:00", "kind": "site_page", "missing": false, "url": "https://docs.agentops.ai"}, {"content_hash": "480d0241314faa48c8c03eb3a108f982c36cc4f41b45008f1940d7fecb0939c0", "fetched_at": "2026-08-29T10:41:30.517671+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/tokencost/json"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:06:04.606647+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-30T03:01:35.437000+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "51a930ebd109e5e30bcf2e85eacdb60490b18ae5d82a43888faa7c1d2e224838", "fetched_at": "2026-08-28T04:06:04.606647+00:00", "kind": "readme", "missing": false, "url": "https://github.com/AgentOps-AI/tokencost"}, {"content_hash": "cf2bd381c35b80343e135f4f1d29fdf2d14c5f9e6f317126accecfaf155a8a09", "fetched_at": "2026-08-29T10:41:30.505831+00:00", "kind": "homepage", "missing": false, "url": "https://agentops.ai"}, {"content_hash": "1caf236089e32cdf973b4af5b1c1f16ac1161e8a2a4a517d68924775c7ec9bf8", "fetched_at": "2026-08-29T10:41:30.515498+00:00", "kind": "site_page", "missing": false, "url": "https://docs.agentops.ai"}, {"content_hash": "480d0241314faa48c8c03eb3a108f982c36cc4f41b45008f1940d7fecb0939c0", "fetched_at": "2026-08-29T10:41:30.517671+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/tokencost/json"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-30T03:01:35.437000+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "51a930ebd109e5e30bcf2e85eacdb60490b18ae5d82a43888faa7c1d2e224838", "fetched_at": "2026-08-28T04:06:04.606647+00:00", "kind": "readme", "missing": false, "url": "https://github.com/AgentOps-AI/tokencost"}, {"content_hash": "cf2bd381c35b80343e135f4f1d29fdf2d14c5f9e6f317126accecfaf155a8a09", "fetched_at": "2026-08-29T10:41:30.505831+00:00", "kind": "homepage", "missing": false, "url": "https://agentops.ai"}, {"content_hash": "1caf236089e32cdf973b4af5b1c1f16ac1161e8a2a4a517d68924775c7ec9bf8", "fetched_at": "2026-08-29T10:41:30.515498+00:00", "kind": "site_page", "missing": false, "url": "https://docs.agentops.ai"}, {"content_hash": "480d0241314faa48c8c03eb3a108f982c36cc4f41b45008f1940d7fecb0939c0", "fetched_at": "2026-08-29T10:41:30.517671+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/tokencost/json"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:06:04.606647+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:06:04.606647+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:06:04.606647+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-30T03:01:35.437000+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "51a930ebd109e5e30bcf2e85eacdb60490b18ae5d82a43888faa7c1d2e224838", "fetched_at": "2026-08-28T04:06:04.606647+00:00", "kind": "readme", "missing": false, "url": "https://github.com/AgentOps-AI/tokencost"}, {"content_hash": "cf2bd381c35b80343e135f4f1d29fdf2d14c5f9e6f317126accecfaf155a8a09", "fetched_at": "2026-08-29T10:41:30.505831+00:00", "kind": "homepage", "missing": false, "url": "https://agentops.ai"}, {"content_hash": "1caf236089e32cdf973b4af5b1c1f16ac1161e8a2a4a517d68924775c7ec9bf8", "fetched_at": "2026-08-29T10:41:30.515498+00:00", "kind": "site_page", "missing": false, "url": "https://docs.agentops.ai"}, {"content_hash": "480d0241314faa48c8c03eb3a108f982c36cc4f41b45008f1940d7fecb0939c0", "fetched_at": "2026-08-29T10:41:30.517671+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/tokencost/json"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:06:04.606647+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:06:04.606647+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-30T03:01:35.437000+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "51a930ebd109e5e30bcf2e85eacdb60490b18ae5d82a43888faa7c1d2e224838", "fetched_at": "2026-08-28T04:06:04.606647+00:00", "kind": "readme", "missing": false, "url": "https://github.com/AgentOps-AI/tokencost"}, {"content_hash": "cf2bd381c35b80343e135f4f1d29fdf2d14c5f9e6f317126accecfaf155a8a09", "fetched_at": "2026-08-29T10:41:30.505831+00:00", "kind": "homepage", "missing": false, "url": "https://agentops.ai"}, {"content_hash": "1caf236089e32cdf973b4af5b1c1f16ac1161e8a2a4a517d68924775c7ec9bf8", "fetched_at": "2026-08-29T10:41:30.515498+00:00", "kind": "site_page", "missing": false, "url": "https://docs.agentops.ai"}, {"content_hash": "480d0241314faa48c8c03eb3a108f982c36cc4f41b45008f1940d7fecb0939c0", "fetched_at": "2026-08-29T10:41:30.517671+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/tokencost/json"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:06:04.606647+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:06:04.606647+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:06:04.606647+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-30T03:01:35.437000+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "51a930ebd109e5e30bcf2e85eacdb60490b18ae5d82a43888faa7c1d2e224838", "fetched_at": "2026-08-28T04:06:04.606647+00:00", "kind": "readme", "missing": false, "url": "https://github.com/AgentOps-AI/tokencost"}, {"content_hash": "cf2bd381c35b80343e135f4f1d29fdf2d14c5f9e6f317126accecfaf155a8a09", "fetched_at": "2026-08-29T10:41:30.505831+00:00", "kind": "homepage", "missing": false, "url": "https://agentops.ai"}, {"content_hash": "1caf236089e32cdf973b4af5b1c1f16ac1161e8a2a4a517d68924775c7ec9bf8", "fetched_at": "2026-08-29T10:41:30.515498+00:00", "kind": "site_page", "missing": false, "url": "https://docs.agentops.ai"}, {"content_hash": "480d0241314faa48c8c03eb3a108f982c36cc4f41b45008f1940d7fecb0939c0", "fetched_at": "2026-08-29T10:41:30.517671+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/tokencost/json"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:06:04.606647+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:06:04.606647+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-30T03:01:35.437000+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "51a930ebd109e5e30bcf2e85eacdb60490b18ae5d82a43888faa7c1d2e224838", "fetched_at": "2026-08-28T04:06:04.606647+00:00", "kind": "readme", "missing": false, "url": "https://github.com/AgentOps-AI/tokencost"}, {"content_hash": "cf2bd381c35b80343e135f4f1d29fdf2d14c5f9e6f317126accecfaf155a8a09", "fetched_at": "2026-08-29T10:41:30.505831+00:00", "kind": "homepage", "missing": false, "url": "https://agentops.ai"}, {"content_hash": "1caf236089e32cdf973b4af5b1c1f16ac1161e8a2a4a517d68924775c7ec9bf8", "fetched_at": "2026-08-29T10:41:30.515498+00:00", "kind": "site_page", "missing": false, "url": "https://docs.agentops.ai"}, {"content_hash": "480d0241314faa48c8c03eb3a108f982c36cc4f41b45008f1940d7fecb0939c0", "fetched_at": "2026-08-29T10:41:30.517671+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/tokencost/json"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-30T03:01:35.437000+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "51a930ebd109e5e30bcf2e85eacdb60490b18ae5d82a43888faa7c1d2e224838", "fetched_at": "2026-08-28T04:06:04.606647+00:00", "kind": "readme", "missing": false, "url": "https://github.com/AgentOps-AI/tokencost"}, {"content_hash": "cf2bd381c35b80343e135f4f1d29fdf2d14c5f9e6f317126accecfaf155a8a09", "fetched_at": "2026-08-29T10:41:30.505831+00:00", "kind": "homepage", "missing": false, "url": "https://agentops.ai"}, {"content_hash": "1caf236089e32cdf973b4af5b1c1f16ac1161e8a2a4a517d68924775c7ec9bf8", "fetched_at": "2026-08-29T10:41:30.515498+00:00", "kind": "site_page", "missing": false, "url": "https://docs.agentops.ai"}, {"content_hash": "480d0241314faa48c8c03eb3a108f982c36cc4f41b45008f1940d7fecb0939c0", "fetched_at": "2026-08-29T10:41:30.517671+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/tokencost/json"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-30T03:01:35.437000+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "51a930ebd109e5e30bcf2e85eacdb60490b18ae5d82a43888faa7c1d2e224838", "fetched_at": "2026-08-28T04:06:04.606647+00:00", "kind": "readme", "missing": false, "url": "https://github.com/AgentOps-AI/tokencost"}, {"content_hash": "cf2bd381c35b80343e135f4f1d29fdf2d14c5f9e6f317126accecfaf155a8a09", "fetched_at": "2026-08-29T10:41:30.505831+00:00", "kind": "homepage", "missing": false, "url": "https://agentops.ai"}, {"content_hash": "1caf236089e32cdf973b4af5b1c1f16ac1161e8a2a4a517d68924775c7ec9bf8", "fetched_at": "2026-08-29T10:41:30.515498+00:00", "kind": "site_page", "missing": false, "url": "https://docs.agentops.ai"}, {"content_hash": "480d0241314faa48c8c03eb3a108f982c36cc4f41b45008f1940d7fecb0939c0", "fetched_at": "2026-08-29T10:41:30.517671+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/tokencost/json"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-30T03:01:35.437000+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "51a930ebd109e5e30bcf2e85eacdb60490b18ae5d82a43888faa7c1d2e224838", "fetched_at": "2026-08-28T04:06:04.606647+00:00", "kind": "readme", "missing": false, "url": "https://github.com/AgentOps-AI/tokencost"}, {"content_hash": "cf2bd381c35b80343e135f4f1d29fdf2d14c5f9e6f317126accecfaf155a8a09", "fetched_at": "2026-08-29T10:41:30.505831+00:00", "kind": "homepage", "missing": false, "url": "https://agentops.ai"}, {"content_hash": "1caf236089e32cdf973b4af5b1c1f16ac1161e8a2a4a517d68924775c7ec9bf8", "fetched_at": "2026-08-29T10:41:30.515498+00:00", "kind": "site_page", "missing": false, "url": "https://docs.agentops.ai"}, {"content_hash": "480d0241314faa48c8c03eb3a108f982c36cc4f41b45008f1940d7fecb0939c0", "fetched_at": "2026-08-29T10:41:30.517671+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/tokencost/json"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 40, "longevity": 71, "rhythm": 42}, "computed_at": "2026-09-02T17:46:02.011165+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 1004, "days_push": 362, "days_rel": 385, "gap_med": 16.5, "n_releases_24m": 13}, "score": 47, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}