The Billing Infrastructure
for AI Products
Meter usage per customer. Enforce quotas and limits. Export to your billing system. Everything you need to monetize AI.
How It Works
Check limits, make your AI call, record usage. We handle the rest.
Check Limits
Verify customer has quota before the AI call
Make AI Call
Call OpenAI, Anthropic, or any LLM provider
Record Usage
Log tokens and costs per customer
Query & Bill
Pull usage data via API for billing
Simple Check-Record Pattern
Two API calls. Full control. Works with any LLM.
# pip install limitry
from limitry import Limitry
client = Limitry()# Check if customer has quota
check = client.usage.check_usage(customer_id="acme-corp")
if check.allowed:response = openai.chat.completions.create(...)
# Record the actual usage
client.usage.record_usage(customer_id="acme-corp",input_tokens=response.usage.prompt_tokens,
output_tokens=response.usage.completion_tokens
)