Every time I tried to estimate production LLM costs, existing calculators had two problems:
- They only multiplied single-prompt token rates—ignoring the real architectural traps that blow up AI bills (multi-turn agent O(N²) context snowballing, MCP tool-schema tax, prompt caching hit rates, KV-cache VRAM overhead).
- They asked me to paste prompts or tool schemas into a web app backed by a server.
So I built TokenLedger — a 100% browser-private, zero-upload, MIT open-source AI & LLM FinOps Studio covering 24 flagship models across 14 interactive calculators.
#
What's Inside (14 Browser-Local Workspaces)
1.
24-Model Live API Cost Estimator — OpenAI (GPT-5, GPT-4.1, o3, o4-mini), Anthropic (Claude Opus 4, Sonnet 4, Haiku 3.5), Google (Gemini 2.5 Pro/Flash/Flash-Lite), DeepSeek (V3, R1), xAI (Grok 3), Meta (Llama 4), Mistral, Qwen, and Perplexity with prompt caching (0–95%), 50% async batch discounts, 70/30 model cascade routing, 5-currency live switcher (USD/EUR/GBP/JPY/KRW),Ctrl+K palette, and Markdown/CSV/PNG exports.
2.
Multi-Turn Agent Burn Simulator — Models quadratic O(N²) context accumulation in ReAct/tool-calling loops vs. prefix prompt caching and sliding-window summarization turn by turn.
3.
MCP & Function-Calling Schema Tax Auditor — Paste your JSON tool definitions locally to rank the heaviest schemas and quantify Prompt Caching vs. Lazy Tool Deferral savings.
4.
GPU VRAM & KV-Cache Quantization Calculator — Models Q4/FP8/FP16 weights + FP8 KV-cache halving across Llama 3.3 70B, DeepSeek-R1, Qwen 32B, and Mistral on 4090 / L40S / A100 / H100.
5.
Self-Hosted GPU vs. Cloud API Break-Even — Finds the exact daily request volume where renting vLLM GPUs + DevOps overhead beats cloud APIs.
6.
Fine-Tuning vs. RAG vs. Caching 12-Month TCO — Compares LoRA training refreshes, vector DB RAG synthesis, and long-context prompt caching with ADR export.
7.
CFO Hybrid Waterfall — Stacks caching + frontier-to-mini cascade + 50% batch tiers into an executive annual savings breakdown.
8.
LLM Rate-Limit (RPM/TPM) Capacity Planner — Calculates burst peak TPM, Little's Law concurrency, required vendor tier, and exports token-bucket rate-limiter JSON.
9.
AI SaaS Gross Margin Simulator &AI Startup Runway Calculator — Models per-seat COGS, Stripe fees, power-user break-even caps, and 24-month cash runway.
10.
RAG & Vector DB TCO Planner &Voice/Vision Multimodal Studio — Sizes embeddings, HNSW RAM, OpenAI Realtime vs. Gemini Live audio, and image generation.
11.
Prompt A/B Cost Diff + GitHub Action CI Budget Guard — Compares prompt rewrites and exports a drop-in GitHub Action YAML to block token regressions in PRs.
12.
Context Window & JSON Schema Minifier Inspector — Estimates OpenAI/Claude/Gemini tokens locally and minifies bloated JSON schemas.
#
Zero-Dependency CLI & Open JSON API
Run estimates directly inside CI or Notion/GitHub RFC workflows:
Or fetch the CORS-enabled pricing snapshot directly:
Everything is open-source (MIT) and runs entirely client-side with zero login walls. If there are specific pricing edge cases you hit in production (AWS Bedrock PTU, extended thinking tokens, multi-GPU tensor parallelism, etc.), drop a comment or open an issue on GitHub!