/**
 * Billing usage tracker for a single call
 */
export interface CallBillingUsage {
    openaiRealtime: {
        inputTokens: number;
        outputTokens: number;
        inputAudioSeconds: number;
        outputAudioSeconds: number;
    };
    openaiChat: {
        inputTokens: number;
        outputTokens: number;
        requestCount: number;
    };
    openaiTTS: {
        characters: number;
        requestCount: number;
    };
    twilio: {
        callDurationSeconds: number;
    };
}
/**
 * Calculate total cost for all services used in a call
 */
export declare function calculateTotalCallCost(usage: CallBillingUsage): number;
/**
 * Aggregate token usage for billing log
 */
export declare function aggregateTokenUsage(usage: CallBillingUsage): Record<string, number>;
/**
 * Log billing for a call
 * Creates 4 separate billing log entries: openai_realtime, openai_chat, openai_tts, and twilio
 */
export declare function logCallBilling(callSid: string, usage: CallBillingUsage): Promise<void>;
/**
 * Initialize empty billing usage tracker
 */
export declare function createEmptyBillingUsage(): CallBillingUsage;
/**
 * Get or create billing usage tracker for a call
 */
export declare function getOrCreateBillingUsage(callSid: string): Promise<CallBillingUsage>;
/**
 * Track OpenAI Realtime API usage
 */
export declare function trackOpenAIRealtimeUsage(callSid: string, usage: {
    input_tokens?: number;
    output_tokens?: number;
    input_audio_seconds?: number;
    output_audio_seconds?: number;
}): Promise<void>;
/**
 * Track OpenAI Chat Completions usage
 */
export declare function trackOpenAIChatUsage(callSid: string, usage: {
    input_tokens?: number;
    output_tokens?: number;
}): Promise<void>;
/**
 * Track OpenAI Text-to-Speech usage
 */
export declare function trackOpenAITTSUsage(callSid: string, characters: number): Promise<void>;
/**
 * Track Twilio call duration
 */
export declare function trackTwilioCallDuration(callSid: string, durationSeconds: number): Promise<void>;
/**
 * Log final aggregated billing for a call and clean up
 * Prevents duplicate billing by checking if call has already been billed
 */
export declare function logFinalCallBilling(callSid: string): Promise<void>;
//# sourceMappingURL=call-billing.d.ts.map