get_percentiles
Compute percentile metrics (latency or cost) for LLM calls. Optionally group by day, hour, or minute for time-series analysis.
Instructions
Get percentile metrics over calls (POST /v1/query/percentiles). metric = 'latency' (ms) or 'cost' (USD); either a single value for the whole range, or a time series with groupBy='day'/'hour'/'minute'. Example phrasing: "daily p95 latency trend for last week". Computed with the nearest-rank method via window functions (D1 SQLite has no percentile_cont).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model filter | |
| metric | No | Metric kind, default = 'latency' | latency |
| endTime | No | Range end ISO timestamp | |
| groupBy | No | Time-series bucketing (omit = one value for the whole range, 'day' = daily, 'hour' = hourly, 'minute' = per minute) | |
| provider | No | Provider filter | |
| startTime | No | Range start ISO timestamp (UTC; omit = all time) |