Where Your LLM Bill Actually Goes, and the Three Levers That Cut It

Leader ●4 ●20 ●175
calendar_today • schedule2 min read

Most of the cost threads here end up in the same place: someone swaps to a cheaper model and the bill barely moves. Sharing the breakdown that finally made it click for us, because the savings are almost never in the model choice.

Input Tokens Are The Bill

Input tokens usually account for 60 to 75 percent of an LLM bill, and a large share of them are identical between calls. Your system prompt ships with every request. Your tool definitions ship with every call, including the tools that will never fire on that request. The conversation history is resent in full on every follow up so the model can rediscover what it already saw.

Run it on a concrete case. A support assistant handling 10,000 conversations a day at 8 turns each: 2,000 tokens of system prompt, 1,500 of tool definitions, 1,500 of retrieved chunks, and by turn 8 roughly 4,000 tokens of accumulated history. That averages near 50,000 input tokens per conversation, about USD 45,000 a month in input alone at USD 3 per million, before output tokens push the total past USD 60,000.

Prompt Caching Is The Cheapest Win

If the front of your prompt is byte identical between requests, providers can cache that prefix and charge a fraction for it on hits. It needs no architectural change, only discipline: stable content first, anything variable last. The usual way teams break this is interpolating a timestamp or a user id near the top of the system prompt, which quietly kills every cache hit.

Routing And Memory Change The Slope

Model routing is the second lever. Classify the request before you spend on it and send the short, repetitive majority to a smaller model. Most production traffic never needed a frontier model.

The third lever changes the shape of the curve rather than the constant. If the model needs a preference the user stated on turn two, storing that fact and retrieving it costs far less than resending the whole transcript every turn so it can be rediscovered. Context stops growing linearly with session length. The full anatomy of the bill and each strategy is written up in this guide to AI cost optimization with the numbers behind it.

Measure Before You Optimize

Log input tokens, output tokens and model per request, grouped by feature. Almost every team that instruments this finds a single feature consuming most of the budget, and it is rarely the one they would have guessed.

🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

Cisco's Amy Chang: A Model's "Passport" Doesn't Tell You Where It Actually Came From

Tom Smithverified - Aug 27

Sovereign Intelligence: The Complete 25,000 Word Blueprint (Download)

Pocket Portfolio - Apr 1

Your AI Doesn't Just Write Tests. It Runs Them Too.

Kevin Martinez - May 12

10 Proven Ways to Cut Your AWS Bill

rogo032 - Jan 16

Three Design-to-Code Rules Most Developers Ignore (That Will Make You a Better Engineer)

Joemetry - Sep 26
chevron_left
4.9k Points • 199 Badges
United States • t.co/5LlztlB5C5
117Posts
19Comments
32Connections
Our AI Apps are a self expanding AI SaaS ecosystem used to create the custom web application of your... Show more

Related Jobs

View all jobs →

Commenters (This Week)

4 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!