UNPKG

cost-claude

Version:

Claude Code cost monitoring, analytics, and optimization toolkit

23 lines 980 B
import { TokenUsage, RateConfig, CostBreakdown } from '../types/index.js'; export declare class CostCalculator { private rates; private pricingService; private model; constructor(customRates?: Partial<RateConfig>, model?: string); private initializeRates; calculate(usage: Partial<TokenUsage>): number; calculateBreakdown(usage: Partial<TokenUsage>): CostBreakdown; calculateCacheEfficiency(usage: Partial<TokenUsage>): number; calculateCacheSavings(usage: Partial<TokenUsage>): number; formatCost(cost: number): string; formatCostAdaptive(cost: number): string; private getRate; updateRates(newRates: Partial<RateConfig>): void; getRates(): RateConfig; estimateCostFromText(inputText: string, outputText: string): number; ensureRatesLoaded(): Promise<void>; switchModel(modelId: string): Promise<void>; getModel(): string; refreshPricing(): Promise<void>; } //# sourceMappingURL=cost-calculator.d.ts.map