Should I subtract the CachedInputTokens with InputTokens when I receive the 'Usage' object back from OpenAI response?
Im trying to calculate how much the response costs in total.
I get back values:
- Input: 1204
- Cached input: 1024
- Output: 12
OpenAI Pricing:
- Input: $0.150 / 1M tokens
- Cached input: $0.075 / 1M tokens
- Output: $0.600 / 1M tokens
I have tried using their official website to find the solution but didn't.
I was expecting Input to be lower (automatically subtracted with the cached input, so result would be 180). Not sure if I should subtract or not, when calculating everything.