Balances and usage
Read customer credits, check access, and track events.
Read a balance
npx orbytelabs balance customer_123The output uses displayed credits. A zero balance is a successful read.
Check access
npx orbytelabs check requests --identity customer_123 --minimum-balance 0.01--minimum-balance is optional and uses displayed credits. Without it, a check
requires a positive matching balance. An allowed check exits 0; a denied check
exits 1. Checks reserve no funds.
Track usage
npx orbytelabs track requests --identity customer_123 --idempotency-key request_123For a feature using sum("tokens"), pass its measured quantity:
npx orbytelabs track tokens --identity customer_123 --payload '{"tokens":1200}' \
--idempotency-key generation_123Reuse the same key and unchanged input to retry an event without charging twice.
The CLI generates and prints a key if omitted. For distinct features, pass the
identity fields with --payload to both check and track.
See checking and tracking for the billing rules.
