Interface: UsageRecord

Defined in: costs/types.ts:28

A single usage record

Properties

id

id: string;

Defined in: costs/types.ts:30

Unique ID for this record

metadata?

optional metadata?: Record<string, unknown>;

Defined in: costs/types.ts:42

Additional metadata

model

model: string;

Defined in: costs/types.ts:34

Model used

provider

provider: string;

Defined in: costs/types.ts:36

Provider name

sessionId?

optional sessionId?: string;

Defined in: costs/types.ts:40

Session ID (if tracking by session)

timestamp

timestamp: Date;

Defined in: costs/types.ts:32

Timestamp of the call

tokens

tokens: TokenUsage;

Defined in: costs/types.ts:38

Token usage