Skip to main content

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​

DimensionDetails
SpendPer-key, per-model, per-provider cost breakdown
Cache SavingsHow much HiveCache saves you in real-time
Token UsagePrompt tokens, completion tokens, total — per request and aggregated
Security EventsGuardrail violations and trends
CompressionToken reduction ratios and savings
Key HealthBudget 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.