If you are building any kind of RAG (Retrieval-Augmented Generation) application or complex LLM pipeline right now, you know the struggle of trying to estimate your API costs.
Our team has a massive, highly proprietary system prompt. It contains our core business logic, database schemas, and custom few-shot examples.
Last week, I needed to figure out exactly how much this behemoth was going to cost us per 1,000 runs if we switched from GPT-4o-mini to Claude 3.5 Sonnet.
The Problem: I started Googling "Claude token counter" or "LLM cost estimator". Almost every single tool on page one either:
Asked me to paste my actual API key so it could "ping the model for me" (Absolutely not).
Was a sketchy single-page app that clearly sent whatever I pasted in the to some random backend server.
You DO NOT paste your company's proprietary source code or system prompts into random cloud text boxes. That is a massive security breach waiting to happen.
The Find:
I stumbled across this site: Mini-Tools.uk AI Token Calculator.
It looks like a standard utility site, but the main reason I am sharing it here is the architecture: It runs 100% locally in your browser. I actually tested itβI loaded the page, turned off my Wi-Fi, pasted our massive 4,000-word prompt, and it instantly calculated the tokens and the exact USD cost. No network requests. No data leaving my machine. It uses a client-side heuristic algorithm to estimate the tokens for English and CJK characters.
Why it earned a permanent bookmark for me:
It factors in Output Costs: A lot of devs ignore that output tokens cost 3x-5x more than input tokens. This tool lets you plug in your "Expected Output" and calculates the blended total.
Up-to-date 2026 Pricing: It has the exact pay-as-you-go rates for GPT-4o, Claude 3.5 (Opus/Sonnet/Haiku), and Gemini 1.5 pre-loaded.
Bulk Projection: It has a neat little box at the bottom that instantly scales the cost to 1,000 API calls, which is super helpful when you are trying to price your SaaS tiers for users.
If you are tired of doing mental math to figure out your OpenAI or Anthropic bills, or if you are paranoid about leaking your prompts, definitely check it out.
Does anyone else have good offline/local tools they use for their AI workflows? Drop them below! π
Top comments (0)