Replicate OpenAI’s per-token pricing model with Lago.
Model | Input | Output |
---|---|---|
8K context | $0.03 / 1,000 tokens | $0.06 / 1,000 tokens |
32K context | $0.06 / 1,000 tokens | $0.12 / 1,000 tokens |
Set up Lago
Create a billable metric
code
for your billable metricaggregation_type
to sum_agg
field_name
to tokens
recurring
to false
filters
to distinguish between models and token typesCreate a plan
code
for your plancharges
, configure pricing tiers for different models and token typesCreate a customer
Create a subscription
code
.Ingest usage via events
code
external_subscription_id
properties
Monitor current usage