QueryAnalyticsRequestBody - TypeScript SDK

QueryAnalyticsRequestBody type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Example Usage

1import { QueryAnalyticsRequestBody } from "@openrouter/sdk/models/operations";
2
3let value: QueryAnalyticsRequestBody = {
4 metrics: [
5 "request_count",
6 ],
7};

Fields

FieldTypeRequiredDescriptionExample
dimensionsstring[]N/A
filtersoperations.Filter[]N/A
granularitystringTime granularityday
groupLimitnumberMaximum rows per distinct combination of dimensions (ClickHouse LIMIT n BY). When omitted on time-series queries (granularity + dimensions), auto-computed to avoid truncating time windows. Explicit values override the default and may truncate time buckets if set lower than the number of buckets in the range. Ignored when no dimensions are specified.100
limitnumberMaximum total rows returned. Defaults to 1000. On time-series queries with dimensions and no explicit group_limit, the server may raise this to accommodate the expected number of unique time-bucket/dimension combinations.
metricsstring[]✔️N/A
orderByoperations.OrderByN/A
timeRangeoperations.TimeRangeN/A