Meters
Query meter
post/api/v1/meters/{meterIdOrSlug}/query
Path parameters
meterIdOrSlugstring required
Request body
Example request
{
"clientId": "f74e58ed-94ce-4041-ae06-cf45420451a3",
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-01-01T01:01:01.001Z",
"windowTimeZone": "UTC",
"subject": [
"subject-1",
"subject-2"
],
"filterCustomerId": [
"id-1",
"id-2"
],
"filterGroupBy": {
"model": [
"gpt-4-turbo",
"gpt-4o"
],
"type": [
"prompt"
]
},
"advancedMeterGroupByFilters": {
"model": {
"$in": [
"gpt-4",
"gpt-4o"
]
},
"type": {
"$eq": "input"
}
},
"groupBy": [
"model",
"type"
]
}Response
The request has succeeded.
Example response
{
"from": "2023-01-01T00:00:00Z",
"to": "2023-01-02T00:00:00Z",
"windowSize": "DAY",
"data": [
{
"value": 12,
"windowStart": "2023-01-01T00:00:00Z",
"windowEnd": "2023-01-02T00:00:00Z",
"subject": "customer-1",
"groupBy": {
"model": "gpt-4-turbo",
"type": "prompt"
}
}
]
}