Get started in 3 steps: generate an API key, track your first LLM call, view your costs.
# 1. Get your API key
curl -X POST https://agentbill.avipilcer.com/api/v1/keys \
-H "Content-Type: application/json" \
-d '{"tier": "free"}'# 2. Track an LLM API call
curl -X POST https://agentbill.avipilcer.com/api/v1/track \
-H "Authorization: Bearer ab_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "code-reviewer",
"provider": "anthropic",
"model": "claude-3-sonnet",
"inputTokens": 1500,
"outputTokens": 800,
"costUsd": 0.012,
"projectId": "my-saas",
"status": "success"
}'# 3. View your costs
curl https://agentbill.avipilcer.com/api/v1/costs \ -H "Authorization: Bearer ab_YOUR_KEY"
All API calls require an API key. Include it in one of these ways:
/api/v1/keysGenerate a new API key
{"tier": "free|starter|pro"}/api/v1/trackAuth RequiredTrack an LLM API call
{"agentId", "provider", "model", "inputTokens", "outputTokens", "costUsd", "projectId", "status"}/api/v1/costsAuth RequiredGet cost breakdowns by agent, model, project
?project_id=x&start_date=x&end_date=x&format=summary|events
/api/v1/budgetsAuth RequiredList all budget rules
?alerts=true
/api/v1/budgetsAuth RequiredCreate a budget rule
{"name", "limitUsd", "period", "projectId?", "agentId?", "action?", "webhookUrl?"}/api/v1/optimizeAuth RequiredGet cost optimization insights
?project_id=x
/api/v1/usageAuth RequiredCheck your API usage and limits
/api/v1/reportsAuth RequiredGenerate a cost report
?period=daily|weekly|monthly&project_id=x
| Plan | Tracked Calls/mo | Projects | Data Retention |
|---|---|---|---|
| Free | 1,000 | 1 | 7 days |
| Starter ($99/mo) | 10,000 | 5 | 30 days |
| Pro ($249/mo) | 100,000 | Unlimited | 90 days |