Budget & Cost Management
Monitor and control your API spending with comprehensive cost tracking and forecasting.
Overview
The Budget Management system helps you:
- Track costs in real-time across all providers
- Set budget limits and receive alerts
- Forecast future spending
- Optimize costs with intelligent recommendations
Cost Dashboard
Access the cost dashboard at /dashboard/admin/costs.
Key Metrics
Total Spend: Current period spending across all providers Budget Utilization: Percentage of monthly budget used Cost per Query: Average cost to execute one query Provider Breakdown: Spending by LLM provider
Cost Trends
View spending trends over time:
- Daily, weekly, or monthly views
- Filter by provider, user, or query type
- Export cost data for reporting
Budget Configuration
Setting Budgets
- Navigate to Admin > Budgets
- Click Create Budget
- Configure:
- Period: Daily, weekly, or monthly
- Amount: Budget limit in USD
- Scope: Organization, team, user, or provider
- Alert Thresholds: 50%, 80%, 100%
Budget Alerts
Receive notifications when spending reaches thresholds:
- Email alerts to administrators
- Dashboard notifications
- Optional enforcement to pause queries
Example Alert Configuration:
Budget: $500/month
Alerts: 50% ($250), 80% ($400), 100% ($500)
Enforcement: Pause queries at 100%
Cost Forecasting
Predictive Analytics
The system forecasts future costs based on:
- Historical usage patterns
- Seasonal adjustments
- Query volume trends
Forecast Types:
- Linear Regression: Simple trend projection
- Exponential Smoothing: Accounts for recent changes
- Seasonal: Detects recurring patterns
Using Forecasts
- View 7-day, 30-day, or 90-day forecasts
- See confidence intervals (upper/lower bounds)
- Plan budgets accordingly
Cost Optimization
Recommendations
The system automatically identifies cost-saving opportunities:
Duplicate Query Detection
- Finds identical queries run multiple times
- Suggests caching strategies
- Estimates savings
Provider Optimization
- Compares provider pricing
- Suggests cheaper alternatives
- Shows cost differences
Batch Operations
- Identifies queries that could be batched
- Estimates efficiency gains
Acting on Recommendations
- Review recommendations in Admin > Cost Optimization
- View estimated savings per recommendation
- Implement suggested changes
- Track savings over time
Cost Breakdown
By Provider
See spending breakdown by LLM provider:
- Claude (Anthropic)
- GPT-4 (OpenAI)
- Perplexity
- Gemini (Google)
By Query Type
Analyze costs by query category:
- Content generation
- Citation analysis
- Competitive research
- Analytics queries
By User/Team
Track spending attribution:
- Individual user costs
- Team-level budgets
- Department spending
Best Practices
Cost Control
- Set Conservative Budgets: Start with lower limits
- Enable Alerts: Never miss threshold warnings
- Review Weekly: Check spending trends regularly
- Act on Recommendations: Implement cost-saving suggestions
Optimization Tips
Cache Results: Reduce duplicate queries Batch Queries: Process multiple at once Choose Providers Wisely: Use cost-effective options Monitor Usage: Track who's spending what
Export & Reporting
Exporting Cost Data
- Navigate to cost dashboard
- Select date range
- Choose format (CSV, JSON)
- Download report
Scheduled Reports
Set up automated cost reports:
- Weekly team summaries
- Monthly executive reports
- Custom schedules
FAQs
Q: What happens when budget is exceeded? A: Depends on enforcement setting. Can either alert only or pause queries.
Q: Can I set different budgets for different teams? A: Yes, create multiple budgets with different scopes.
Q: How accurate are the forecasts? A: Accuracy improves with more historical data. Typically ±10-15%.
Q: Can I track costs by project? A: Yes, use tags on queries to group by project.
Related Features
- Analytics - Detailed usage analytics
- Query Execution - Query cost visibility
- Admin Dashboard - Budget overview cards