Skip to main content

Metrics API Reference

The Metrics API provides analytics and performance data for your LLM usage, enabling you to track costs, optimize routing, and measure performance.
Note: Response schemas shown are illustrative. Actual responses may vary.

Authentication

All metrics endpoints require API key authentication:

Endpoints Overview


Overview Metrics

Get a high-level summary of your routing performance.

Endpoint

Query Parameters

Example Request

Response


Customer Metrics

Get detailed metrics specific to your API key and usage patterns.

Endpoint

Query Parameters

Example Request

Response


Performance Metrics

Analyze model performance broken down by task type.

Endpoint

Query Parameters

Example Request

Response


Failure Analysis

Understand why calls fail and which models are most reliable.

Endpoint

Query Parameters

Example Request

Response


Provider Health

Monitor provider reliability and performance trends.

Endpoint

Query Parameters

Example Request

Response


Daily Metrics

Get daily aggregated metrics for trend analysis and reporting.

Endpoint

Query Parameters

Example Request

Response


Use Cases

Dashboard Building

Cost Monitoring

Performance Optimization

Rate Limits

Metrics API has separate rate limits:

Best Practices

  1. Cache metrics data: Results change slowly, cache for 5-15 minutes
  2. Use appropriate time ranges: Longer periods for trends, shorter for real-time monitoring
  3. Set up alerts: Monitor projected_month_end and failure_rate
  4. Review weekly: Check recommendations for optimization opportunities

Support