In short: put the stable part of the prompt first so it is cached, stop resending the whole chat history, cap reply length, and send easy requests to a smaller model. Together these often cut cost per user by half or more. Then measure cost per user, not total spend, to see what worked.
Providers charge much less for prompt tokens they have seen recently. Keep the system prompt, tools and instructions identical and at the start of every request so they hit the cache. Cost per message (1,500-token prompt, 400-token reply):
| Model | No cache | Half cached | 90% cached |
|---|---|---|---|
| GPT-6 sol | $0.0070 | $0.0056 | $0.0046 |
| GPT-6 luna | $0.00035 | $0.00028 | $0.00023 |
| GPT-5.5 | $0.0195 | $0.0161 | $0.0134 |
| GPT-5 mini | $0.0012 | $0.0010 | $0.00087 |
| GPT-5 nano | $0.00023 | $0.00020 | $0.00017 |
| GPT-4.1 | $0.0062 | $0.0051 | $0.0042 |
| GPT-4o | $0.0077 | $0.0068 | $0.0061 |
| GPT-4o mini | $0.00047 | $0.00041 | $0.00036 |
Every turn resends the conversation. Keep the last few turns verbatim and replace older ones with a short summary.
Output tokens cost several times more than input. Set max_tokens per feature and ask for concise answers where it fits.
Classification, short rewrites and extraction rarely need a frontier model. Compare prices on the LLM pricing page and test quality on real requests before switching.
Cache identical answers, debounce typing-triggered calls, and skip AI for inputs a rule can handle.
The heaviest few users can cost more than everyone else together. A limit per plan caps them: how to limit AI usage per plan, with numbers from the pricing planner.
Total spend hides where the money goes. Tag each AI call with the user and the feature, and look at cost per user over time. FiscaLLM does this with one line per call, free and open source: see the demo.
Usually the model choice, then prompt caching. Moving easy requests to a smaller model can cut their cost by 5 to 20 times; caching a long, stable system prompt cuts the input part by up to 90% on providers that discount cached tokens.
Compare AI cost per user before and after, not total spend, which also moves with the number of users. FiscaLLM shows cost per user by model and feature, so the effect of each change is visible.