Product Catalog
Create feature
Features are either metered or static. A feature is metered if meterSlug is provided at creation. For metered features you can pass additional filters that will be applied when calculating feature usage, based on the meter's groupBy fields. Meters with SUM, COUNT, UNIQUE_COUNT and LATEST aggregations are supported for features.
post/api/v1/features
Request
- Base URLhttps://openmeter.cloud (the document declares no server; this is the origin it was published from)
- Auth
- HTTP bearer
- or API key in cookie __session
Request body
Example request
{
"advancedMeterGroupByFilters": {
"model": {
"$in": [
"gpt-4",
"gpt-4o"
]
},
"type": {
"$eq": "input"
}
},
"metadata": {
"externalId": "019142cc-a016-796a-8113-1a942fecd26d"
},
"meterGroupByFilters": {
"model": "gpt-4",
"type": "input"
},
"meterSlug": "tokens_total"
}Response
The request has succeeded and a new resource has been created as a result.
Example response
{
"advancedMeterGroupByFilters": {
"model": {
"$in": [
"gpt-4",
"gpt-4o"
]
},
"type": {
"$eq": "input"
}
},
"archivedAt": "2023-01-01T01:01:01.001Z",
"createdAt": "2024-01-01T01:01:01.001Z",
"deletedAt": "2024-01-01T01:01:01.001Z",
"id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"metadata": {
"externalId": "019142cc-a016-796a-8113-1a942fecd26d"
},
"meterGroupByFilters": {
"model": "gpt-4",
"type": "input"
},
"meterSlug": "tokens_total",
"updatedAt": "2024-01-01T01:01:01.001Z"
}Changes
No recorded changes to this operation across all 2 revisions of this API.