Meter Rates (Cost Calculation)
Meter rates define how usage is converted into cost.
This page explains how to configure cost rates on a meter so that all incoming usage can be translated into accurate spend.
This assumes you have already created one or more meters.
How Meter Rates Work
When usage is ingested into a meter, Amberflo:
- Matches the usage to a meter
- Applies a rate defined on that meter
- Calculates the resulting cost
The rate is the rule that determines how each unit of usage is valued.
Rates can change over time. When they do, you create a new rate configuration and apply it going forward.
Navigate to Meter Rates
- Go to Cost → Configure → Meters
- Select the meter you want to configure
- On the meter details page, click the Rate tab (middle tab)
- Click Create Meter Rate (top right)
Create a Meter Rate
Basic Fields
- Label A name for the rate configurationSince rates may change over time, use a label that reflects the version or context. Examples:
- OpenAI Pricing - Jan 2026
- v1 Cost Rates
- GPT Model Pricing Q1
- Description (optional) Add context about what this rate represents
Choose a Rate Model
Amberflo supports two primary models for cost calculation.
1. Per Unit
Each unit of usage has the same cost.
Example:
- Every API call costs $0.005
- Every job execution costs $0.10
This model is appropriate when cost does not vary based on context.
2. Per Unit with Dimensions (Recommended)
Cost varies based on attributes of the usage.
This is the standard approach for most real-world systems.
Why Use Dimensions
In many systems, cost is not uniform. It depends on factors such as:
- Type of operation
- Resource used
- Configuration of the request
For example, with token-based usage:
- Input tokens and output tokens have different costs
- Different models have different pricing
These differences are captured using dimensions.
Build the Rate Table
When using Per Unit with Dimensions, you define a table of rates.
- Each column represents a dimension
- Each row represents a unique combination of dimension values
- Each row has a per-unit cost
Example Structure
If your meter includes:
- model
- token_type
Your table might include rows like:
- model = A, token_type = input → cost X
- model = A, token_type = output → cost Y
- model = B, token_type = input → cost Z
Each combination can have a different cost.
Configuring the Table
- Remove any dimensions that are not relevant to cost calculation (for example, workload is typically used for attribution, not pricing)
- Use Add Row to define new combinations
- Use Add Column if you need to include additional dimensions
For each row:
- Set the dimension values
- Enter the corresponding cost per unit
Automation Options
You do not need to configure rates manually in the UI.
Amberflo supports:
- API-based configuration
- CSV import
This allows you to:
- Sync rates from external pricing sources
- Update rates programmatically
- Manage large pricing tables efficiently
Saving and Applying Rates
Once your rate configuration is complete:
- Click Save
From that point forward:
- All new usage events for that meter will use this rate configuration
- Cost will be calculated automatically based on the defined rules
Updating Rates Over Time
Rates change. When they do:
- Create a new meter rate
- Use a clear label to indicate the new version
- Apply it going forward
Do not overwrite previous configurations if you need historical accuracy.
Summary
Meter rates are the foundation of cost calculation in Amberflo.
They:
- Define how usage translates into cost
- Support both simple and complex pricing logic
- Allow variation based on dimensions
- Can be managed manually or programmatically
Accurate rates ensure that your cost data reflects the real behavior of your systems.