Track credit consumption
Records credit consumption in one of two forms: draw an ad-hoc cost against the account’s open block (feature + cost), or settle a prior reservation with the amount used (reservation_id + used). A deny is returned as 200 { allowed: false }. Settlement is idempotent — a retry with the same Idempotency-Key replays the recorded outcome instead of double-settling.
Authorizations
API key authentication. Pass your API key as a Bearer token.
Headers
2026-04-01 A unique string used to ensure the request is processed exactly once. If you retry a request with the same idempotency key within 24 hours, the original response is returned without re-executing the operation.
255"ik_a1b2c3d4e5f6"
Body
Customer account ID or alias; direct-consumption mode
"cust_abc123"
Credits to draw for this call; direct-consumption mode, mutually exclusive with reservation_id/used.
"5"
Usage event name recorded for metering/overflow billing; direct-consumption mode
"api_call"
Feature the credits are consumed against; direct-consumption mode
"llm_tokens"
Event properties used to resolve customer-specific filter groups; direct-consumption mode. Never a billing source of truth.
Reservation token returned by /check, to settle; reservation-settlement mode. Mutually exclusive with feature/cost.
"crt_abc123"
Usage event timestamp (RFC3339). Defaults to now; direct-consumption mode.
"2026-04-01T10:00:00Z"
Organization-global idempotency key for the recorded usage event and credit draw; required in direct-consumption mode
"evt_abc123"
Credits actually used against the reservation; reservation-settlement mode.
"3"
Response
Success
Whether the consumption was covered by available credit
Available credit balance for the account after this call
Credit quantity covered by this call
Quantity not covered by credit that overflows to metered billing
Reservation this call settled or opened. Empty for a direct-consumption draw that opened no block.
"crt_abc123"
True when the referenced reservation had expired and the work was re-resolved as a fresh consume