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