system prompt / mo
total bill / mo
is the preamble
cache saves / mo

Where your input tokens go

The monthly bill split into the fixed preamble you re-send every time, the dynamic user and context tokens, and the output. The first row is the tax — it does not shrink when users say less.

PartTokens / requestCost / moShare

How prompt size scales the tax

Each row is a different system-prompt length at your current volume. The uncached column is the naive cost; the cached column applies your hit rate and discount. This is why a prompt that grew from 500 to 4,000 tokens quietly multiplied your bill.

System promptUncached / moCached / movs yours

The prompt you wrote once, you pay for a million times

A system prompt feels free because you write it once and forget it, but the API is stateless, so that preamble rides along on every single call and is billed as input tokens each time. The trap is short, high-volume requests: a classifier or a router that receives twenty tokens of user text and a two-thousand-token instruction block is spending 99% of its input budget on words the user never sent. The fix is boring and effective — read your system prompt as if you were paying per word, because you are, and cut the polite filler, the duplicated rules and the tool schemas you almost never invoke. Then cache what survives, since a stable preamble is exactly what prompt caching was built for and a cached read costs roughly a tenth of a fresh one. The reason trimming comes first is that it helps unconditionally, on cache misses and hits alike, while caching only pays off on the requests that arrive while the cache is warm and only if the prefix stays byte-for-byte identical — one timestamp near the top and the discount evaporates. Size the caching lever precisely on the prompt caching savings calculator, check the write-versus-read break-even on the cache write break-even calculator, and count the tokens in your current prompt with the token counter.

Host your project:DigitalOcean — $200 free ↗Hostinger VPS
Prompt Caching SavingsCache Write Break-evenFunction Calling CostToken CounterLLM Cost Optimization