Skip to main content TrueFoundry AI Gateway makes it easy to track and manage costs for all your AI model usage. This guide walks you through setting up cost tracking, viewing detailed breakdowns, and analyzing your spending.
Setting Up Cost Tracking
To set up cost tracking for your AI models:
From the TrueFoundry dashboard, navigate to AI Gateway > Models
Select any Provider Account
Click on the Edit button for an existing model or + Add Model to create a new one
In the model configuration screen, you’ll find cost options
TrueFoundry offers two simple ways to track costs:
1. Public Cost - Automatic Pricing
Public cost uses pre-configured pricing based on the provider’s published rates:
Automatically populated cost per token
Always up-to-date with official provider rates
Available for most popular models
2. Private Cost - Custom Pricing
Private cost lets you set custom pricing for:
Models without public pricing
Custom pricing contracts
Fine-tuned models
Viewing Your Costs
Once set up, you can easily view and analyze your costs in the Metrics section. Go to AI Gateway > Metrics.
The Metrics page shows your total costs, usage trends, and provides interactive filters to analyze your spending patterns.
Cost Breakdowns
View your costs from different perspectives with a single click:
Each view helps you understand different aspects of your AI usage:
User view : Identify high-usage individuals
Model view : See which models cost the most
Team view : Track department or project spending
Exporting Cost Data
Need to analyze your data further? Easily export it:
Go to the Metrics section
Click on the 3 dots button and then click on Download Raw Data
Choose the fields you want to groupBy the data
Custom Grouping Options
You can customize how data is grouped in your exports. Simply select the fields you want to group by, such as username, model_name, or teams, to get exactly the data organization you need for your analysis.