Streaming, token budgets and cost
medium 7 minStreaming reveals progress before generation is complete.
Where it shows up
The same pattern appears across everyday software.
One request, three clocks and one bill
Reserve enough context for the answer. For this example use fictional prices of $2 per million input tokens and $8 per million output tokens. The UI receives several complete events. A partial network chunk is buffered before it becomes a text update. The visible prefix is still provisional. The terminal event confirms completion. Input costs $0.0024 and output costs another $0.0024. Record actual usage separately from the original reservation.