Skip to main content
POST
cURL
Usage endpoints are served from https://api-meter.metrifox.com. Other API calls stay on https://api.metrifox.com.
For example, before a customer generates an AI image, check they have quota and record the generation in a single call.
If the action doesn’t complete β€” or the customer ends up using a different amount β€” correct the recorded usage with Adjust a Usage Event.

Authorizations

x-api-key
string
header
required

Body

application/json
customer_key
string
required

The unique customer identifier in your application.

event_id
string
required

Required idempotency key. The usage is recorded at most once per event_id, so retries are safe.

feature_key
string | null

Feature to check and record against. Either feature_key or event_name is required.

event_name
string | null

Event name configured on the feature. Either event_name or feature_key is required.

quantity
number
default:1

Quantity to check and record. Defaults to 1.

credit_used
number | null

Optional credits used for this event (prepaid features).

Response

Access checked. When can_access is true the usage was recorded.

data
object