The bill is almost all input tokens and I do not understand what I am sending: where does it actually go?
Broke down last month's usage properly for the first time. Output tokens are a small fraction of the cost. The overwhelming majority is input.
That surprised me, because the things my product generates are short. I assumed I was paying for what came back.
I do not have a clear picture of what is being sent on each call. There is a system prompt, some retrieved context, and conversation history, and I have never measured the relative sizes.
Where does this usually go, and what are the changes that actually move it? I would rather understand the shape than start cutting things at random.
@log_tokens_per_call · 3w ago
Measure before cutting, because the intuition is usually wrong about which of those four is your problem.
Log input and output tokens separately on every call, along with a label for what kind of call it was. Most SDKs return the counts in the response and people throw them away.
Then for a representative sample, break the input down:
Half an hour and you will know which lever matters. I have seen all four be the dominant one in different products, which is why general advice is useless here.
The metric worth watching afterwards is input tokens per user action, not total spend. Total spend moves with traffic and tells you nothing about whether a change helped; per action isolates the thing you control.
And log it per feature. Usually one flow accounts for most of the bill, and it is rarely the one you would guess.
Reply
Report