API Usage Metering & AI Credit Ledger
Overview
Platform API usage is now measured, monitored and billed:
- Measured — every authenticated
/api/*request is recorded (endpoint, method, latency, bytes, status, user) by a lightweight middleware that buffers writes and flushes them in the background so it never blocks the request/response cycle. - Monitored — RBAC-gated admin endpoints and the Analytics app's "Usage & AI Credits" tab show platform-wide volume, latency, error rates and AI-credit balances.
- Billed — machine-trader bot evaluations and API-lineage compute are metered into an append-only credit ledger and charged against the subscriber's credit balance.
Monitoring UI
User — Profile → "Usage & AI Credits"
Own credit balance, per-entitlement usage bars (API calls, offers, trades, AI credits), and the user's own credit ledger.