Create a new billable metric for a merchant organization. A Billable Metric represents a metric that can be used to measure the usage of a Product. It contains information about the metric, such as its name, description, and units.
API key authentication
Aggregation calculation method for metric values.
SUM, COUNT, AVG, MIN, MAX, UNIQUE_COUNT, LATEST Explanatory text describing what the metric tracks and how it's used for billing. Sample values: 'Total tokens consumed by Claude language model interactions', 'Gigabytes of cloud storage utilized', 'Count of machine learning inference requests processed', 'Quantity of AI-generated images created', 'Compute hours spent training neural networks', 'Terabytes of data transferred'
The unique identifier of the merchant organization associated with the billable metric.
Human-readable label identifying what this metric measures. Sample values: 'Claude Tokens', 'Storage Capacity', 'Model Inference Calls', 'Generated Images', 'Training Compute Hours', 'Data Transfer Volume'
The unique identifier of the product associated with the billable metric.
Measurement unit used when aggregating this metric's values. Common examples: 'tokens', 'GB', 'calls', 'images', 'hours', 'TB', 'queries', 'requests'
CloudEvents type for meter routing. Links this billable metric to the metering service.
JSONPath to extract numeric value from event data. Required for SUM/AVG/MIN/MAX/LATEST aggregations.
Map of dimension name to JSONPath for group-by queries.
Only count events after this timestamp. Used for meter versioning.
Billable metric created successfully
Unique identifier for a billable metric
billableMetric SUM, COUNT, AVG, MIN, MAX, UNIQUE_COUNT, LATEST Unique identifier for an organization
Unique identifier for a product