Budget Management
Conduit provides comprehensive tools for managing and controlling LLM spending through budget limits, usage tracking, and cost optimization.
Cost Tracking
Conduit automatically tracks costs for all requests:
- Per Virtual Key: Track spending by application or user
- Per Provider: Monitor costs across different LLM services
- Per Model: See which models are most expensive
- Time-Based: View costs by day, week, month, or custom periods
Accessing Cost Data
Via Web UI
- Navigate to Cost Dashboard
- View cost breakdowns by different dimensions
- Filter by date range, provider, model, or virtual key
- Export data as CSV for further analysis
Via API
curl http://localhost:5000/admin/costs \
-H "Authorization: Bearer your-master-key" \
-G --data-urlencode "start_date=2023-01-01" \
--data-urlencode "end_date=2023-01-31"
Budget Limits
Conduit provides several levels of budget controls:
Virtual Key Budgets
Set spending limits on individual virtual keys:
- Navigate to Virtual Keys
- Create or edit a virtual key
- Expand the Budget Controls section
- Configure:
- Daily Limit: Maximum spending per day
- Monthly Limit: Maximum spending per month
- Total Limit: Maximum lifetime spending
- Save the configuration
Global Budget Limits
Set organization-wide spending limits:
- Navigate to Configuration > Budget
- Configure:
- Daily Global Limit: Maximum total spending per day
- Monthly Global Limit: Maximum total spending per month
- Provider Limits: Maximum spending per provider
- Save the configuration
Budget Alerts
Configure notifications when spending reaches certain thresholds:
- Navigate to Configuration > Notifications
- Add a budget alert
- Configure:
- Threshold: Percentage or absolute amount
- Scope: Global, provider, or virtual key
- Notification Method: Email, webhook, or UI
- Save the configuration
Cost Optimization Strategies
Routing for Cost
Use the Least Cost routing strategy to automatically select the most economical provider:
- Navigate to Configuration > Routing
- Select Least Cost as the routing strategy
- Save the configuration
Caching
Enable caching to avoid paying for repeated identical requests:
- Navigate to Configuration > Caching
- Enable caching
- Configure cache settings
- Save the configuration
See the Cache Configuration guide for details.
Model Cost Definition
Define and update model costs to ensure accurate budget management:
- Navigate to Configuration > Model Costs
- View or edit existing model costs
- Add missing models with their costs
- Save the configuration
Spend History
Access detailed spending history to analyze trends:
- Navigate to Virtual Keys > (select key) > Spend History
- View spending over time
- Identify usage patterns and cost drivers
- Export data for reporting
Implementing a Cost Control Pipeline
For comprehensive cost control, implement this pipeline:
- Track: Enable detailed cost tracking
- Analyze: Regularly review the Cost Dashboard
- Optimize: Use caching and least-cost routing
- Limit: Set appropriate budget limits
- Alert: Configure notifications for threshold breaches
- Adjust: Modify limits and settings based on actual usage
Next Steps
- Learn about Cache Configuration for cost optimization
- Explore Model Routing for cost-based routing
- See the Virtual Keys guide for per-key budget controls