Analytics & Observability
ModelHive gives you complete visibility into your LLM usage across every dimension — spending, tokens, cache performance, security events, and more. All accessible via the dashboard or API.
What You Can Track
| Dimension | Details |
|---|---|
| Spend | Per-key, per-model, per-provider cost breakdown |
| Cache Savings | How much HiveCache saves you in real-time |
| Token Usage | Prompt tokens, completion tokens, total — per request and aggregated |
| Security Events | Guardrail violations and trends |
| Compression | Token reduction ratios and savings |
| Key Health | Budget utilization, auto-recharge status |
Dashboard Overview
The analytics dashboard provides a single-pane view of your tenant's activity:
- Spend by API key — See which keys are consuming the most budget
- Spend by provider — Understand cost distribution across OpenAI, Anthropic, Google, etc.
- Cache stats — Hit rate, total savings, and performance metrics
- Security summary — Recent violations by type
- Top models — Most-used models with spend breakdown
Filtering & Drill-Down
Filter analytics by:
- Date range — Analyze any time period
- API key — Isolate spend for a specific key
- Model — Focus on a particular model
- Provider — Compare provider costs
EU vs. Non-EU Tracking
Since ModelHive supports both EU and non-EU providers, analytics automatically track:
- How many requests go to EU-resident models
- How many go to non-EU models
- This helps maintain GDPR compliance visibility
Admin Revenue Analytics
Platform administrators get additional revenue visibility:
- Global revenue summary
- Revenue breakdown by tenant
- Revenue breakdown by API key
- Cache revenue tracking
- Consumption forecasts
API Access
All analytics are available programmatically:
# Dashboard overview
GET /api/analytics/dashboard?tenant_id={tenant_id}
# Detailed usage over time
GET /api/analytics/usage-overview?tenant_id={tenant_id}&start_date=2026-01-01&end_date=2026-01-31
# Per-request logs with filtering
GET /api/analytics/usage/logs?tenant_id={tenant_id}&model=gpt-4o
# Cache performance
GET /api/tenants/{tenant_id}/analytics/cache
# Security events
GET /api/analytics/usage/security?tenant_id={tenant_id}
tip
Use the filter endpoint GET /api/analytics/usage/filters to discover available keys, models, and providers for your tenant before querying detailed logs.