Skip to main content
The Metrics API enables you to retrieve customized analytics from your ABV data. This endpoint allows you to specify dimensions, metrics, filters, and time granularity to build powerful custom reports and dashboards for your LLM applications.

Overview

The Metrics API supports querying across different views (traces, observations, scores) and allows you to:
  • Select specific dimensions to group your data
  • Apply multiple metrics with different aggregation methods
  • Filter data based on metadata, timestamps, and other properties
  • Analyze data across time with customizable granularity
  • Order results according to your needs

Query Parameters

The API accepts a JSON query object passed as a URL-encoded parameter:

Query Object Structure

Dimension Object Structure

Metric Object Structure

Common measure types include:
  • count - Count of records
  • latency - Duration/latency metrics
Aggregation types include:
  • sum - Sum of values
  • avg - Average of values
  • count - Count of records
  • max - Maximum value
  • min - Minimum value
  • p50 - 50th percentile
  • p75 - 75th percentile
  • p90 - 90th percentile
  • p95 - 95th percentile
  • p99 - 99th percentile

Filter Object Structure

Time Dimension Object

Supported granularities include: hour, day, week, month, and auto.

Example

Here’s an example of querying the number of traces grouped by name:

API

Response:

Python SDK

Install package

Data Model

The Metrics API provides access to several data views, each with its own set of dimensions and metrics you can query. This section outlines the available options for each view.

Available Views

Trace Dimensions

Trace Metrics

Observation Dimensions

Observation Metrics

Score Dimensions (Common)

Score Metrics

Numeric Scores

Categorical Scores

Categorical scores have an additional dimension: