IFClite TypeScript API
    Preparing search index...

    Interface TokenUsage

    Provider-reported token usage, read from the frames each protocol actually streams. A parser returns null when the frame carries no complete count; callers then record "usage not reported" rather than inventing a number.

    interface TokenUsage {
        inputTokens: number;
        outputTokens: number;
    }
    Index
    inputTokens: number

    Prompt tokens the provider billed, cached prompt tokens included.

    outputTokens: number

    Completion tokens the provider billed, reasoning tokens included.