Meters
Create meter
Create a meter.
post/v3/openmeter/meters
Request body
Example request
{
"labels": {
"env": "test"
},
"key": "resource_key",
"event_type": "prompt",
"events_from": "2023-01-01T01:01:01.001Z",
"value_property": "$.tokens",
"dimensions": {
"type": "$.type"
}
}Response
Meter created response.
Example response
{
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"key": "tokens_total",
"name": "Tokens Total",
"description": "AI Token Usage",
"aggregation": "sum",
"event_type": "prompt",
"value_property": "$.tokens",
"dimensions": {
"model": "$.model",
"type": "$.type"
},
"created_at": "2024-01-01T01:01:01.001Z",
"updated_at": "2024-01-01T01:01:01.001Z"
}Changes
Changed in 2 of the 75 revisions of this API.3
- ○
the response property
created_atbecame required for the status201response-property-became-required
- ○
the response property
updated_atbecame required for the status201response-property-became-required
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
endpoint added
endpoint-added
This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○