CumulativeTokenUsage
Session running totals of counted-once usage.
The cache splits and server-computed cost join the counters. The counters
stay accumulate-only; cost is the documented exception — it may move
either way on price re-adoption and is labeled estimate. Copy was dropped
for the cost member.
Fields and variants
Section titled “Fields and variants”cacheReadTokenscacheWriteTokenscostoutputTokenspromptTokenstotalTokens
Source
schema/msp/experimental/msp.schema.json#/types/CumulativeTokenUsage
{ "description": "Session running totals of counted-once usage.\n\nThe cache splits and server-computed `cost` join the counters. The counters\nstay accumulate-only; `cost` is the documented exception — it may move\neither way on price re-adoption and is labeled estimate. `Copy` was dropped\nfor the `cost` member.", "properties": { "cacheReadTokens": { "description": "Cache-read tokens, session total: saturating sum of\nthe per-completion splits; an absent split contributes 0.\nAdditive-optional: absent on the wire reads as 0 and zero totals\nare omitted, so pre-feature bytes decode and re-encode identically.", "type": "integer" }, "cacheWriteTokens": { "description": "Cache-write tokens, session total. Additive-optional\nlike the read split.", "type": "integer" }, "cost": { "$ref": "#/$defs/CumulativeCost", "description": "Server-computed session cost: `None` (wire-absent)\nwhen no leg is priced — clients omit the row. Additive-optional:\nabsent reads as unpriced." }, "outputTokens": { "description": "Output tokens, session total.", "type": "integer" }, "promptTokens": { "description": "Counted-once prompt tokens, session total.", "type": "integer" }, "totalTokens": { "description": "Counted-once totals, session total.", "type": "integer" } }, "required": [ "outputTokens", "promptTokens", "totalTokens" ], "type": "object"}