What You Can Track
ABV monitors two key metrics for every LLM generation:Usage Details
Number of units consumed per usage type (tokens, characters, etc.)
Cost Details
USD cost per usage type, calculated or ingested
input/output- Basic token countscached_tokens- Cached input tokens (Anthropic prompt caching)audio_tokens- Audio input tokensimage_tokens- Image input tokensreasoning_tokens- Reasoning tokens (OpenAI o1 models)- Custom usage types for your specific needs
How It Works
ABV supports two approaches to tracking usage and costs:1. Ingest from LLM Responses (Recommended)
Extract usage and cost data directly from your LLM provider’s API responses and send them to ABV. Best for:- Production applications
- Accurate billing and cost allocation
- All model types, including reasoning models
2. Infer from Model Definitions
Let ABV automatically calculate usage and costs using predefined tokenizers and pricing. Best for:- Development and prototyping
- Supported models (OpenAI, Anthropic, Google)
- Quick setup without code changes
Priority: When both ingested and inferred data are available, ABV always uses ingested values for accuracy.
Documentation Structure
This cost tracking documentation is organized into three focused guides:Overview
Concepts & Decision MakingUnderstand ingest vs infer approaches, usage types, and when to use each method.
Implementation
Step-by-Step GuidesComplete code examples for Python and JavaScript/TypeScript SDKs with all integration methods.
Reference
API & Advanced ConfigCustom model definitions, tokenizers, pricing configuration, and the Models API.
Key Features
Automatic Provider Integrations
Automatic Provider Integrations
Many ABV integrations automatically capture usage and cost from LLM responses. Works with:
- OpenAI
- Anthropic
- And more…
Flexible Usage Types
Flexible Usage Types
Track any usage metric that matters to you:
- Standard tokens (input/output)
- Cached tokens
- Audio and image tokens
- Reasoning tokens
- Custom metrics for your models
Custom Model Support
Custom Model Support
Define your own models with:
- Custom pricing per usage type
- Regex-based model matching
- Tokenization configuration
- Priority over default models
Analytics & Export
Analytics & Export
Access your usage data through:
- Real-time dashboards in the UI
- Daily Metrics API for export
- Filtering by user, tag, or application
- Integration with your billing systems
Supported Models
ABV comes with predefined support for popular models:- OpenAI: GPT-4, GPT-3.5, GPT-4o, o1 (reasoning models)
- Anthropic: Claude 4 family (Opus, Sonnet, Haiku)
- Google: Gemini models