Meter Rates (Cost Calculation)
9 min
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
