v51

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2026-08-011534301009.2 KB
Meters

List meters

List meters.

get/api/v1/meters

Query parameters

pageinteger

Page index.

Default is 1.

pageSizeinteger

The maximum number of items per page.

Default is 100.

order'ASC' | 'DESC'

The order direction.

The order direction.

orderBy'key' | 'name' | 'aggregation' | 'createdAt' | 'updatedAt'

Order by options for meters.

The order by field.

includeDeletedboolean

Include deleted meters.

Response

The request has succeeded.

idstring required

A unique identifier for the resource.

descriptionstring

Optional description of the resource. Maximum 1024 characters.

metadataMetadata

Set of key-value pairs. Metadata can be used to store additional information about a resource.

createdAtstring date-time required

Timestamp of when the resource was created.

updatedAtstring date-time required

Timestamp of when the resource was last updated.

deletedAtstring date-time

Timestamp of when the resource was permanently deleted.

namestring

Human-readable name for the resource. Between 1 and 256 characters. Defaults to the slug if not specified.

slugstring required

A unique, human-readable identifier for the meter. Must consist only alphanumeric and underscore characters.

aggregation'SUM' | 'COUNT' | 'UNIQUE_COUNT' | 'AVG' | 'MIN' | 'MAX' | 'LATEST' required

The aggregation type to use for the meter.

eventTypestring required

The event type to aggregate.

eventFromstring date-time

The date since the meter should include events. Useful to skip old events. If not specified, all historical events are included.

valuePropertystring

JSONPath expression to extract the value from the ingested event's data property.

The ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number.

For UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored.

groupByobject

Named JSONPath expressions to extract the group by values from the event data.

Keys must be unique and consist only alphanumeric and underscore characters.

annotationsAnnotations

Set of key-value pairs managed by the system. Cannot be modified by user.

Example response

[
  {
    "id": "01G65Z755AFWAKHE12NY0CQ9FH",
    "slug": "tokens_total",
    "name": "Tokens Total",
    "description": "AI Token Usage",
    "aggregation": "SUM",
    "eventType": "prompt",
    "valueProperty": "$.tokens",
    "groupBy": {
      "model": "$.model",
      "type": "$.type"
    },
    "createdAt": "2024-01-01T01:01:01.001Z",
    "updatedAt": "2024-01-01T01:01:01.001Z"
  }
]