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 {
        DurationSeconds?: number;
        InputTokenDetails?: RealtimeUsageModalityDetail;
        InputTokens: number;
        OutputTokenDetails?: RealtimeUsageModalityDetail;
        OutputTokens: number;
    }
    Index

    Properties

    DurationSeconds?: number

    Number of voice-duration seconds reported in this usage update (cumulative snapshot).

    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, and the seconds of avatar video generated since the last update (VideoSeconds). An update may carry only those seconds, with both token totals 0. See RealtimeUsage.InputTokenDetails.

    OutputTokens: number

    Number of output tokens reported in this usage update.