Skip to main content

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

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

  1. Navigate to Admin > Budgets
  2. Click Create Budget
  3. 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

  1. View 7-day, 30-day, or 90-day forecasts
  2. See confidence intervals (upper/lower bounds)
  3. 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

  1. Review recommendations in Admin > Cost Optimization
  2. View estimated savings per recommendation
  3. Implement suggested changes
  4. 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

  1. Set Conservative Budgets: Start with lower limits
  2. Enable Alerts: Never miss threshold warnings
  3. Review Weekly: Check spending trends regularly
  4. 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

  1. Navigate to cost dashboard
  2. Select date range
  3. Choose format (CSV, JSON)
  4. 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.