Status: [LIVE] Endpoints found: https://billyzhonguom.github.io/llm Source: https://github.com/BillyZhongUOM/llm-cost-calculator # TokenTally — LLM API cost calculator Live: **https://billyzhonguom.github.io/llm-cost-calculator/** A free, client-side calculator that estimates what LLM API usage actually costs, and compares providers on your exact workload. It models the three things most "tokens times price" calculators skip: 1. **Prompt caching** — a repeated prefix billed at the cache-read rate (~0.1x input), after the provider's write premium or first-call cost. 2. **Batch discounts** — the ~50% async discount, where a provider offers one. 3. **The agent / chatbot context tax** — every turn re-sends the whole history, so cost compounds turn by turn. TokenTally sums each turn explicitly and shows how much caching claws back. A flat per-step estimate can be off by 2x or more on a long agent run. No backend, no sign-up, nothing leaves your browser except the share link you choose to copy. ## Why it exists The market is full of token-times-price comparison tables, and they all stop at the easy part. The cost that surprises teams is the agent loop, where a 12-step run does not bill 12 small prompts, it bills a prompt that grows toward 20,000 tokens, again and again. No calculator surveyed modelled that turn by turn. This one does, and it turns the result into advice ("your toggles save $X/mo", "caching is costing you here, turn it off") rather than a bare number. ## Scenarios | Scenario | Models | Volume unit | |----------|--------|-------------| | Single call | one prompt in, one answer out | calls / month | | Chatbot | multi-turn thread, context grows each turn | conversations / month | | Agent | tool loop, context piles up each step | runs / month | | RAG | template + retrieved chunks + question | queries / month | | Batch | template + per-item, async discount | items / month | ## Architecture Vanilla HTML, CSS and ES modules. No framework, no build step. ``` index.html structure, SEO, JSON-LD styles.css design system (amber-on-slate instrument, light + dark) engin