usage.updated
⚠️
Preview — this feature is being built; the design below is the spec.
Received on the stream and in the event list. Running token and cost totals after each model call.
Example
id: evt_01JC7M3B
data: {"type": "usage.updated", "usage": {"input_tokens": 18234, "cached_input_tokens": 12288, "output_tokens": 1420, "cost_usd": "0.0436"}}Fields
| Field | Meaning |
|---|---|
usage | Totals for the whole session so far. |
Handling
Enforce your own per-user budgets or show cost in an operator console.
Was this page helpful?