Meter slug
Unique identifier included in forward tokens to apply specific pricing
Fee model
Fixed credits per usage unit, or a percentage of provider cost
Usage units
What you’re measuring — tokens, characters, seconds, or requests
Pricing tiers
Volume-based rate schedules that reward higher usage
Meter configuration
Full create example with all parameters
Full create example with all parameters
- Node.js SDK
- cURL
Usage units
Usage units define what metric drives pricing. Set via the field:| Unit type | Label | Rate basis | Example use case |
|---|---|---|---|
tokens_1m | Tokens | credits per 1M tokens | LLM APIs |
characters_1m | Characters | credits per 1M characters | Text-to-speech |
minutes | Seconds | credits per minute | Audio processing, voice calls |
requests | Requests | credits per request | Image generation, API calls |
Fee models
The field determines how fees are calculated.- Fixed
- Percentage
Charge a fixed number of credits per usage unit (tokens, characters, time, or requests), regardless of the provider’s dollar cost:Example:
2 credits per 1M tokens with input+output basis- 500 input tokens + 200 output tokens = 700 tokens
- Credits:
2 × 700 / 1,000,000 = 0.0014credits
Pricing tiers
Tiers let you offer volume-based pricing. Each tier defines a usage threshold and rate. As cumulative usage increases, later tiers apply.At least one tier is required. The first tier must start at
0, and tier starts must be in ascending order.Example: Three-tier token pricing
Example: Three-tier token pricing
| Tier | Start | Rate (credits per 1M tokens) |
|---|---|---|
| 1 | 0 | 5 |
| 2 | 1,000,000 | 3 |
| 3 | 10,000,000 | 1 |
- First 1M at 5 credits/1M = 5 credits
- Next 4M at 3 credits/1M = 12 credits
- Total: 17 credits deducted from their balance
Next steps
Checkout
Embed checkout to onboard paying customers
Gateway vs Post-Request
Choose how usage gets reported to Lava