Bluestep JS Documentation
    Preparing search index...

    Type Alias AiUsageReport

    Current AI spend against the configured budget for a resolved scope, returned by B.ai.usageReporting().

    type AiUsageReport = {
        budgetSchedule:
            | "HOURLY"
            | "DAILY"
            | "WEEKLY"
            | "MONTHLY"
            | "LIFETIME"
            | null;
        configured: boolean;
        maxIterations: number
        | null;
        maxSpendMicros: number | null;
        spendMicrosUsed: number;
        windowEnd: string | null;
        windowStart: string | null;
    }
    Index
    budgetSchedule: "HOURLY" | "DAILY" | "WEEKLY" | "MONTHLY" | "LIFETIME" | null

    Budget reset schedule. Null when the scope is unconfigured.

    configured: boolean

    True when an ai_tenant_config row exists for the resolved scope.

    maxIterations: number | null

    Configured per-call iteration cap. Null when the scope is unconfigured.

    maxSpendMicros: number | null

    Configured spend budget for the window, in micro-dollars. Null when the scope is unconfigured (soft rollout — unlimited but still tracked).

    spendMicrosUsed: number

    Total spend within the current budget window for the resolved scope, in micro-dollars (1_000_000 = $1.00).

    windowEnd: string | null

    ISO-8601 end of the current budget window. Null when the scope is unconfigured or on a LIFETIME schedule.

    windowStart: string | null

    ISO-8601 start of the current budget window. Null when the scope is unconfigured.