> ## Documentation Index
> Fetch the complete documentation index at: https://openrouter.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# QueryAnalyticsRequestBody

## Example Usage

```typescript theme={null}
import { QueryAnalyticsRequestBody } from "@openrouter/sdk/models/operations";

let value: QueryAnalyticsRequestBody = {
  metrics: [
    "request_count",
  ],
};
```

## Fields

| Field | Type | Required | Description | Example |
| - | - | - | - | - |
| `apiKeyTagKey` | *string* | ➖ | Tag key to group by when `dimensions` includes `api_key_tag`, e.g. `team`. Each API key has at most one value per tag key, so groups do not overlap: keys with the tag group under its value, and keys with the tag but no value under the key name. Keys without the tag are left out of the results. Without this field, each `key:value` tag is its own group and a key with several tags counts toward each. | team |
| `classifierDimensions` | [operations.ClassifierDimensions](../../models/operations/classifierdimensions.mdx) | ➖ | Group results by custom classifier tags, breaking down metrics by the specified dimension values. Requires an active classifier on the workspace. | |
| `classifierFilters` | [operations.ClassifierFilters](../../models/operations/classifierfilters.mdx) | ➖ | Filter results to generations with specific classifier tag values. Can be combined with classifier\_dimensions (must use the same classifier\_id) or used independently with standard dimensions. | |
| `dimensions` | *string*\[] | ➖ | N/A | |
| `filters` | *models.Filter*\[] | ➖ | N/A | |
| `granularity` | *string* | ➖ | Time granularity | day |
| `groupLimit` | *number* | ➖ | Maximum rows per distinct combination of dimensions. 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 |
| `limit` | *number* | ➖ | Maximum 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. | |
| `metrics` | *string*\[] | ✔️ | N/A | |
| `orderBy` | [operations.OrderBy](../../models/operations/orderby.mdx) | ➖ | N/A | |
| `timeRange` | [operations.TimeRange](../../models/operations/timerange.mdx) | ➖ | N/A | |
