Project

tokenometer

Estimate prompt spend before execution and price actual provider usage after each LLM step.

Focus

  • LLM cost
  • TypeScript
  • Developer tooling

GitHub Description

Token counting, cost modeling, and runtime LLM usage pricing.

  • Makes LLM token and cost tradeoffs visible before integration work starts.
  • Useful for prompt iteration, provider comparison, and runtime budget-aware AI tooling.
  • The Tokenometer website is the canonical live experience for the project.

Package Links

Preview / Demo

Basic token-cost estimate

A 1,250 token prompt plus a 350 token response is roughly 1,600 total tokens. Tokenometer now also prices completed provider usage, which is the missing primitive for multi-step agent budgets.

Basic Demo

Tokenometer helps estimate token volume before LLM work becomes spend.

Example estimate: a 1,250 token prompt with a 350 token response is roughly 1,600 total tokens. At $0.00001 per token, that single call is about $0.016 before batching, retries, or multi-step chains. The core library can also price completed provider usage after each step.

Prompt tokens 1,250 Response tokens 350 Estimated cost $0.016 Open tokenometer.dev