Checking Quotas
Check usage quotas with the Python SDK
Check if a customer has exceeded their usage quota.
Check Quota
async with Client(api_key="your-api-key") as client:
result = await client.quotas.check(
customer_id="customer_123",
event_type="model_call",
)
if result.allowed:
# Proceed with the request
pass
else:
# Quota exceeded
raise Exception("Quota exceeded")Next Steps
- Tracking Events - Track usage
- Usage Analytics - Get usage data