billing
read access.
usage
parameter to the middleware. This will allow you to track how much of your API is being used.
Usage object takes in value
and id
(optional). If id
is not passed, the usage will be tracked per customer based on the customerId in the API key.
In the example below, we are passing in customer_123----fine_tune
as the id. In this case we have built a custom meter for tracking the usage of fine-tuning a model for a customer by creating a hash of the customerId and the meter name.