Record meter event
Records usage that contributes to your organization’s CostGraph bill. CostGraph services call this endpoint as you use them. You do not need to report that usage again.
To invoice your own customers for attributed cloud spend, use Billing exports.
Authentication
Use a tenant API key with effective billing:meter:write permission. Tokens used to install the CostGraph Operator or Agent cannot call this endpoint. Billing must be configured for the organization. A signed-in member or an authorized OAuth app can also use a bearer token.
An OAuth app can report pricing_api_requests. With the mcp scope, it can also report chat_api_requests with value set to 1.
Repeated requests
Each accepted call adds value to a ledger line for the tenant, meter, optional resource, and current UTC month. The response’s value is the accumulated count. Its idempotency_key identifies that monthly line and does not deduplicate requests.
Retrying an accepted request counts the usage again and can increase your bill. After a timeout, check whether the usage was recorded before resending.
Example
The following body records one Pricing API request. Use it only when implementing usage reporting that CostGraph does not already perform for the request.
A successful request returns 201 and the updated ledger line in data. For a new monthly line, the response includes these fields.
Sending the same request again returns an accumulated value of 2.
Headers
Body
Meter event details
CostGraph meter to increment. Request meters count Pricing API or AI assistant requests. vm_metrics_only_counts records VM metrics-only usage. Compute and managed-spend meters are calculated from cost data and return 400 here.
pricing_api_requests, chat_api_requests, vm_metrics_only_counts "pricing_api_requests"