Definitions
Point fields (from /api/metrics)¶
t: ISO timestamp (bucket start, hourly for 24h/7d, daily for 30d)costUSD: Sum ofRun.costUSDin bucket (rounded to 5 decimals)errorRate:errors / countwithstatus != 'success'p95LatencyMs: 95th percentile oflatencyMsin bucketruns: total runs in buckettokensIn: sum ofinputTokenstokensOut: sum ofoutputTokens
Aggregates¶
costByProvider: sum ofcostUSDbyprovidercostByModel: sum ofcostUSDbymodel
Reliability metrics¶
- Error rate: fraction of non‑
successover total - Success rate:
1 - errorRate
Percentiles¶
- p50/p95/p99: compute over the set of
latencyMsvalues in the bucket. - Current API returns
p95LatencyMsonly.
Cost normalization¶
- Cost per 1k tokens (example):
costUSD / ((tokensIn + tokensOut) / 1000)when tokens > 0.
Examples