Docs
Usage Tracking
Usage Tracking
Monitor API requests, token consumption, and usage patterns.
Track your organization's API usage to understand consumption patterns, optimize performance, and plan capacity.
Usage Metrics
Request Tracking
| Metric | Description |
|---|---|
| Total Requests | All API calls made |
| Requests/Day | Daily request volume |
| Peak Requests | Highest request rate |
| Success Rate | Percentage of successful calls |
Token Tracking
| Metric | Description |
|---|---|
| Input Tokens | Prompt token consumption |
| Output Tokens | Response token consumption |
| Tokens/Request | Average tokens per call |
| Token Efficiency | Output/input ratio |
Viewing Usage
Usage Dashboard
- Go to Analytics > Usage
- Select your time range
- View usage charts and tables
By Model
See which models you use most:
| Model | Requests | Tokens | Cost |
|---|---|---|---|
| gpt-4o-mini | 10,000 | 5M | $15 |
| claude-3-haiku | 5,000 | 2M | $10 |
| gpt-4o | 2,000 | 1M | $25 |
By API Key
Track usage per key:
| Key | Requests | Tokens | Cost |
|---|---|---|---|
| production-api | 15,000 | 7M | $45 |
| development | 2,000 | 1M | $5 |
Usage Patterns
Time-Based Analysis
View usage by:
- Hour of day: Identify peak times
- Day of week: Weekday vs weekend patterns
- Month: Seasonal trends
Request Types
Break down by endpoint:
- Chat completions
- Embeddings
- Completions (legacy)
Token Optimization
Understanding Token Counts
Tokens are roughly:
- 1 token ≈ 4 characters in English
- 1 token ≈ 0.75 words
Reducing Token Usage
- Concise prompts: Remove unnecessary text
- Set max_tokens: Limit response length
- Use smaller models: For simple tasks
- Cache responses: For repeated queries
Efficient Prompting
# Verbose (more tokens)
"Please analyze the following text and provide a comprehensive summary
that covers all the main points and key details..."
# Concise (fewer tokens)
"Summarize this text:"
Alerts and Notifications
Set up usage alerts:
- Daily/weekly usage reports
- Threshold alerts (e.g., 80% of budget)
- Unusual activity notifications
Quotas and Limits
Storage Quotas by Plan
| Plan | Storage |
|---|---|
| Free | 500 MB |
| Standard | 5 GB |
| Premium | 15 GB |
| Enterprise | 1 TB |
Viewing Quota Usage
- Go to Analytics > Storage
- See current usage vs limit
- View breakdown by type
API Access to Usage Data
Query usage programmatically (where available):
# Example: Get usage summary
# Note: Usage API availability depends on your planRelated
- Analytics Overview - Dashboard overview
- Cost Dashboard - Cost tracking
- Virtual Keys - Key-level tracking