# Usage and limits ## Understand your usage **Usage** combines Codex, Claude Code, and Grok Build session history from your connected environments. It shows token use, cache savings, model breakdowns, and estimated API-equivalent cost. These estimates are not your subscription bill. Totals depend on the history available on each server. Grok turns without a saved completed-turn record are missing from the totals. On web and desktop, use the environment dropdown to filter costs, tokens, and limits. All environments are selected by default. The dropdown shows which environments are still scanning; results appear as each one responds. If recent work is missing or a new model shows no cost, refresh to rescan session history and update model pricing. Use **Past 24h** for an hourly chart covering the exact rolling 24-hour period. The **7 days**, **30 days**, and **90 days** ranges use daily resolution. Cost and token toggles update both the headline and chart. ## Agent usage queries Agents can call `t3_environment_usage` to inspect the current environment's aggregated usage. The query accepts at most 31 calendar days at daily resolution or 24 hours at hourly resolution. Large bucket sets are paged; pages read the live cache and can shift when new transcript records arrive. For hourly queries, `sinceDay` must match the local day of `sinceTime`, while `untilDay` must match the local day of the last included instant (`untilTime - 1 ms`). `untilTime` is exclusive, so an exclusive local-midnight boundary uses the preceding local day, including across a daylight-saving transition. The result reports token totals, cache savings, pricing status, and whether each bucket was priced from provider-reported cost, a model rate, or not priced. Dollar figures are API-equivalent estimates, not subscription charges. Pricing provenance uses a fixed public-catalog label rather than a service URL. Provider-source status and file counts come from the existing usage service. A missing source is not proof of zero usage; nonzero skipped-file counts can also represent empty, unreadable, or unusable files even when the source status is `ok`. This is an explicit read, but it can scan provider transcript files, refresh the existing pricing cache, and update the existing scan cache. It never returns transcript contents, provider-home paths, source fingerprints, credentials, or raw scan errors. ## Set custom model prices On web or desktop, open the environment dropdown on **Usage**, then choose **Model prices** to add, edit, or reset a model's estimated price. **Apply to** starts with your current Usage filter; choose all environments or select individual destinations. Enter the exact model ID and USD rates per million input and output tokens. You can enter any model ID, including models without public pricing. Cache read and cache write rates are optional and use the input rate when blank. Enter `0` for tokens that are free. Saved prices replace automatic pricing for all of that environment's history and are shared with clients connected to it. When environments have different prices, cells show **Mixed**. Edit rates directly in the table, then choose **Save changes** to apply all edited rows. Untouched cells keep each environment's rate. Select one environment to inspect its prices. **Reset to automatic** marks a model's override for removal when you save; you can undo it before saving. Each destination reports whether the change saved. Offline or unavailable environments are marked **Not saved**. Reconnect them and choose **Retry failed saves** to finish the same change without writing again to environments that already saved. Changes are not queued after you close the dialog. ## Track subscription limits **Usage → Limits** shows quota use and reset times for Codex and Claude subscriptions. It also compares quota consumed with time elapsed in each window, so you can judge your pace before the next reset. If a window looks stale, refresh Limits to re-check every provider and hub. API-key accounts may not report subscription limits. This also applies to Claude connections using a proxy through `ANTHROPIC_AUTH_TOKEN`. ## Connect a CLIProxyAPI hub To see pooled accounts, open **Settings → Providers → Usage providers → Add hub**. Choose the environment that will connect to the hub and enter its URL and management key. The accounts appear under **Usage → Limits**. This connection supplies usage information; configure the provider separately to send agent requests through the hub. Remove the hub from the same settings section when you no longer need it.