Usage and costs
Use /usage to check token counts and costs recorded by fx on this machine. For billed usage, check your provider dashboard.
Inspect local usage
From your terminal, show usage for the last 30 days:
fx usageChoose a period or return structured output:
fx usage --period 24h --jsonPeriods are 24h, 7d, and 30d. Reports include requests, tokens, spend, and a breakdown by model. In fx, /usage also lets you view the current session.
A partial window means tracking started during the selected period. Pending totals exclude requests awaiting usage data from Gateway. Incomplete totals are missing some usage data.
Account billing
Local reports cover this fx profile on this machine. Other devices and applications using the same account are excluded.
For billed usage and subscription limits, check your provider's dashboard. Missing cost information in fx does not mean a request was free.
Additional model requests
These features can make requests in addition to the main conversation:
| Feature | When it runs |
|---|---|
| Auto mode | A tool action needs a model review. |
| Subagents | Each subagent makes its own model requests. |
| Vision fallback | AI Gateway analyzes images for a model without image input. |
| Context compaction | fx summarizes older context automatically or through /compact. |
| Session titles | fx generates a title from the first prompt. |
Title requests are excluded from session usage totals. Turn them off with session_titles: false in your profile or through /settings.
Web search can also add provider charges.
Check your AI Gateway balance
With AI Gateway selected, check the balance for the active credential:
fx creditsFor billing details, open your AI Gateway dashboard.