Member Junction
    Preparing search index...

    Interface RealtimeUsage

    Incremental usage/telemetry reported during a realtime session.

    This is the realtime-specific counterpart to Core's request/response ModelUsage. Because a realtime session is long-lived and usage is reported in increments (and checkpointed incrementally), this type carries the token deltas a provider emits over the life of the session rather than a single final tally.

    interface RealtimeUsage {
        InputTokenDetails?: RealtimeUsageModalityDetail;
        InputTokens: number;
        OutputTokenDetails?: RealtimeUsageModalityDetail;
        OutputTokens: number;
    }
    Index

    Properties

    InputTokenDetails?: RealtimeUsageModalityDetail

    Per-modality breakdown of the input tokens, when the provider reports one. Realtime models bill audio and text tokens at very different rates (e.g. GPT Realtime 2.1: $32/M audio in vs $4/M text in), so cost attribution REQUIRES this split — the totals alone force a wrong blended rate. Absent when the provider reports only totals.

    InputTokens: number

    Number of input tokens reported in this usage update.

    OutputTokenDetails?: RealtimeUsageModalityDetail

    Per-modality breakdown of the output tokens, when the provider reports one. See RealtimeUsage.InputTokenDetails.

    OutputTokens: number

    Number of output tokens reported in this usage update.