AIDK API Reference / aidk-shared / TokenUsage
Interface: TokenUsage ​
Defined in: packages/shared/src/models.ts:81
Token usage information (normalized across providers).
Used in ModelOutput, stream events, and execution metrics.
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
cacheCreationTokens? | number | Tokens used to create cache (Anthropic prompt caching) | packages/shared/src/models.ts:98 |
cachedInputTokens? | number | Tokens read from cache (Anthropic prompt caching) | packages/shared/src/models.ts:95 |
inputTokens | number | Input tokens consumed | packages/shared/src/models.ts:83 |
outputTokens | number | Output tokens generated | packages/shared/src/models.ts:86 |
reasoningTokens? | number | Reasoning/thinking tokens (Anthropic extended thinking, OpenAI o1) | packages/shared/src/models.ts:92 |
totalTokens | number | Total tokens (input + output) | packages/shared/src/models.ts:89 |