get_usage
Your account's usage in one of three views. view='report': requests, weighted units, errors and latency per key, method and chain over a look-back window (hours, default 24; optional chain). view='stats': one console report — report='latency' | 'errors' | 'spend' | 'cache' — for a window ('24h', '7d', '30d'). view='volume': request counts over time (optional chain). Use it to answer 'how much did we use, where, and how fast'. Not for invoices (use get_statement), balances (use get_billing_status) or one key's settings (use list_api_keys). Returns JSON: report → since, total_requests, weighted_units, by_class, cache_hits, success_rate, p50/p95_duration_ms, by_key, by_method, by_chain; stats → window, buckets, series, summary and report-specific totals; volume → window, bucket_seconds, buckets. Read-only. Needs your API key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | Yes | 'report' (per-key usage), 'stats' (a console report), or 'volume' (over time) | |
| chain | No | Filter by chain, e.g. 'eth_mainnet' (report, volume) | |
| hours | No | Look-back window in hours for view='report' (default 24) | |
| report | No | For view='stats': 'latency' | 'errors' | 'spend' | 'cache' | |
| window | No | For view='stats' and 'volume': '24h' (default), '7d', '30d' |