Live prompt cost meter
Write prompts with a price tag in view. As you type, this meter shows a running token count and dollar cost for your selected model and expected completion length — so you feel the cost of a verbose system prompt before it ships to production.
How it works
The meter estimates tokens locally from your text, blending a character-based rule (approximately 1 token per 4 characters) with a word count for stability across short and long inputs. It then prices the call:
prompt_cost = (prompt_tokens / 1,000,000) x input_price
output_cost = (expected_completion / 1,000,000) x output_price
total = prompt_cost + output_cost
Because output is priced several times higher than input on most models, the completion-length
field often dominates the total — a useful reminder that capping max_tokens is
often the cheapest single optimization you can make.
Why tracking cost while writing matters
The biggest prompt cost leaks are invisible until the bill arrives. Common culprits include:
- Bloated system prompts — a 2,000-token system prompt paid on every call across 10,000 daily requests compounds quickly
- Redundant context — including entire documents when a relevant excerpt would serve
- Open-ended completions — letting the model generate 4,000 tokens when 400 is sufficient for the task
The live meter makes these visible as you draft, so you fix them before they scale.
What affects the cost most
Output tokens are priced 3 to 5 times higher than input tokens on most frontier models. A short prompt requesting a long answer costs more than a long prompt requesting a short one. For classification, extraction, or yes/no tasks, constraining the output with a direct instruction can cut per-call cost dramatically.
Tips
- Trim the system prompt — it is paid on every single call; the meter makes that cost visible.
- Set a realistic completion length — estimate your typical answer size so the total reflects real usage.
- Verify before launch — for exact, billable counts, confirm with a provider-backed tokenizer; this meter is a fast drafting aid, not a billing guarantee.
How prompt length scales with daily cost
The cost impact of a single token in a system prompt is easy to underestimate until you multiply it out. For a system prompt that is 500 tokens longer than it needs to be, at a typical input price, across 10,000 calls per day, the monthly excess can easily reach tens of dollars or more depending on the model. The live meter makes this relationship visible: you can see the marginal cost of each paragraph you add and make an informed decision about whether it earns its place in every call.