Meters convert raw events into billable quantities. They filter events and apply aggregation functions (Count, Sum, Max, Last) to calculate usage per customer.

API Resources
Creating a Meter
Aggregation
Choose how events are aggregated:
- Count: Total number of events (API calls, uploads)
- Sum: Add numeric values (tokens, bytes)
- Max: Highest value in period (peak users)
- Last: Most recent value
Metadata key to aggregate (required for all types except Count). Examples:
tokens, bytes, duration_msUnit label for invoices. Examples:
calls, tokens, GB, hoursFiltering (Optional)

- AND logic: All conditions must match
- OR logic: Any condition can match
Viewing Analytics

- Overview: Total usage and usage chart
- Events: Individual events received
- Customers: Per-customer usage and charges
Billing in Credits Instead of Currency
By default, meters charge customers per-unit in dollars (or your configured currency). You can instead configure a meter to deduct from a credit balance - so usage consumes credits rather than generating a monetary charge.Credit-based deduction requires a Credit Entitlement attached to the same product. Create your credit first, then link it to the meter.
When to Use Credit-Based Deduction
| Scenario | Standard (currency) | Credit-based |
|---|---|---|
| Simple per-unit pricing ($0.01/call) | ✅ Best fit | Unnecessary overhead |
| Prepaid credit packs (buy 10K tokens, use over time) | ❌ Can’t express | ✅ Best fit |
| Bundled usage with subscriptions (Pro plan includes 100K calls) | Possible via free threshold | ✅ Better - credits roll over, expire, show in portal |
| Multi-meter products sharing a credit pool | ❌ Each meter bills separately | ✅ All meters deduct from one balance |
Configuring a Meter to Deduct Credits
Create a Credit Entitlement
First, create a credit in Products → Credits. Define the unit (e.g., “API Calls”, “Tokens”), precision, and lifecycle settings (expiry, rollover, overage).See the Credit-Based Billing guide for detailed instructions.
Create or Edit a Usage-Based Product
Go to your usage-based product and open the Meter configuration section.
Add a Meter
Click the + button to attach a meter. Configure the event name, aggregation type, and measurement unit as usual.
Enable 'Bill Usage in Credits'
Toggle Bill usage in Credits on the meter configuration. This reveals the credit settings:

Select which credit entitlement this meter should deduct from.
The number of usage units required to deduct 1 credit. For example:
1= each meter event deducts 1 credit100= 100 meter events deduct 1 credit1000= 1,000 API calls consume 1 credit
How Credit Deduction Works
Once configured, the deduction pipeline runs automatically:- Events arrive - Your application sends usage events via the Event Ingestion API
- Meter aggregates - Events are aggregated per your meter configuration (Count, Sum, Max, Last)
- Background worker processes - Every minute, a worker fetches new events since the last checkpoint
- Credits are deducted - Aggregated usage is converted to credits using the
meter_units_per_creditrate and deducted using FIFO ordering (oldest grants consumed first) - Overage tracked - If the balance hits zero and overage is enabled, usage continues and overage is handled according to the configured behavior (forgiven at reset, billed at next invoice, or carried forward as deficit)
Multiple Meters, One Credit Pool
You can link multiple meters on the same product to the same credit entitlement. All meters deduct from one shared balance. Example: An AI platform with two meters:text.generation- 1 credit per 1,000 tokensimage.generation- 10 credits per image
List Customer Ledger
View the full credit deduction history for a customer.
Get Customer Balance
Check a customer’s current credit balance via API.
Troubleshooting
Events not appearing
Events not appearing
- Event name must match exactly (case-sensitive)
- Check meter filters aren’t excluding events
- Verify customer IDs exist
- Temporarily disable filters to test
Aggregation not working
Aggregation not working
- Verify Over Property matches metadata key exactly
- Use numbers, not strings:
tokens: 150not"150" - Include required properties in all events
Filters not working
Filters not working
- Match case exactly
- Use correct operators for data type
- Ensure events include filtered properties
Wrong usage totals
Wrong usage totals
- Check Events tab to count actual events received
- Verify aggregation type (Count vs Sum)
- Ensure values are numeric for Sum/Max