InteractionProcessTokenUsage
The tokens one agent turn of an interaction run used: the breakdown by kind (input, output, cache, reasoning), the provider and model that served it, the agent, and the key it ran on.
Kind: an object, used in responses.
Fields
Section titled “Fields”Every field is present in a response; empty ones are null.
| Field | Type | Description |
|---|---|---|
turnId | uuid | The record’s own id. A turn that moved to another key or model part-way has one record for each, and a summary of the conversation has its own, so don’t treat it as an id for the turn. |
date | datetime | When the call completed (UTC). |
provider | string | The provider that served the call, such as Anthropic or OpenAi. |
model | string | The model used for the call. |
agentName | string | The participant whose turn used the tokens. |
agentId | uuid | null | The agent that made the call, when it may differ from the participant’s own: a router’s choice takes the turn, and the routing call itself is the router’s. Null for Maitento’s own work, such as summarising the conversation or memory. |
usages | InteractionTokenUsageItem[] | The tokens used, by kind: input, output, cache_read, cache_creation_5m, cache_creation_1h and reasoning. Added to as the turn goes. |
finished | boolean | True once the turn has completed. False while it is still going; a record left false means the turn was cut off, and its counts are what was recorded before that. |
credentialId | string | null | The credentialId of the key that served the turn, maitento-fallback for Maitento’s own key, or null when no key applies (such as a self-hosted model). |
isOwnLicense | boolean | True when the turn ran on a key of your own; false for Maitento’s own key, or when unknown. |
tier | string | null | The pricing tier of the call, for a model priced in tiers. Null when there is none. |
Example
Section titled “Example”{ "turnId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f", "date": "2026-10-26T12:00:00.0000000Z", "provider": "...", "model": "...", "agentName": "...", "agentId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f", "usages": [ { "type": "...", "count": 0 } ], "finished": false, "credentialId": "...", "isOwnLicense": false, "tier": "..."}Where it’s used
Section titled “Where it’s used”- Inside
InteractionProcess - Inside
InteractionProcessWithDetails - Inside
NightWeaving