Problems / What Did That Request Cost?
What Did That Request Cost? Price one request from its token counts
- Sheet
- E-01
- Difficulty
- Easy 2
- Format
- Exact answer
- Mode
- Simulated
- Sub-topics
- Cache Pricing
Work out what one request costs when most of its input was read from the cache.
The Situation
A support bot sends one request to a medium model. Models read text in tokens, which are small pieces of words, and providers charge by the token. Each request starts with the same help manual, followed by the customer's chat. The provider keeps the start of each request in a cache, so the model reads the manual from the cache at a lower price.
This is the provider's usage record for the request:
| Field | Tokens |
|---|---|
input_tokens | 40,616 |
cached_tokens | 39,900 |
output_tokens | 270 |
total_tokens | 40,886 |
The Prices
| Kind of token | Dollars per million tokens |
|---|---|
| Input | $3.00 |
| Input read from the cache | $0.30 |
| Output (the reply) | $15.00 |
The Question
What does this one request cost, in dollars? Don't round to cents: an answer within 0.5% of the correct value is accepted. You can type $ signs and commas.
Need a Hint?
Hint 1 of 3 caps what you can earn at 18 out of 20 points. Points you’ve already earned stay. How points work