Price a block of context by its position
price_context_readPrice a block of context by where it enters a session. The API is stateless, so the whole transcript is re-sent on every inference step, and a token costs its size times the number of turns left after it arrives. Returns the carried token volume, the cost of the block in USD, what the same read would have cost entering 20 turns from the end, and the multiplier between the two. Use it to decide whether a large read should move later in a session or into a subagent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| read_mult | No | Cache-read price multiplier against input price. Default 0.1. | |
| entry_turn | Yes | Turn number at which the block enters the context (t). | |
| write_mult | No | Cache-write price multiplier against input price. Default 1.25. | |
| size_tokens | Yes | Size of the block in tokens (S). | |
| total_turns | Yes | Total turns in the session (T). Must be at least entry_turn. | |
| price_in_per_mtok | No | Input price in USD per million tokens. Default 5. |