AI Gateway displays usage costs in USD instead of abstract credits
AI Gateway usage now displays in real dollar amounts rather than abstract credit counts — a terminology shift from "credits" to "wallet/budget/balance" that makes spending visible.
The AI Gateway previously showed users an abstract credit count — an integer with no connection to actual dollars spent. Now the interface displays USD amounts directly, so users see "$1.53 / $2.00 remaining" instead of "47 / 100 credits remaining". The terminology has shifted from "credits" to "wallet," "budget," and "balance" throughout the platform — in API endpoints, state management, composables, and UI components.
This change touches every layer of the stack. The backend renamed /ai/gateway/credits to /ai/gateway/wallet and returns { budget, balance } instead of { creditsQuota, creditsRemaining }. Frontend stores and composables now expose balance and budget computed properties, and the usage table column renamed from "Credits" to "Cost (USD)" with proper dollar formatting applied.
The shift matters because it removes a layer of abstraction between users and their spending. Credit counts required mental math to understand real costs; dollar amounts do not. This aligns AI Gateway with how users think about other subscription services, where the currency of payment is visible from the start.
View Original GitHub Description
Summary
Renames "credits" terminology to "wallet/budget/balance" across the AI Gateway feature and switches display values from integer credit counts to USD dollar amounts ($X.XX).
What changed:
AI_GATEWAY_CREDITSconstant →AI_GATEWAY_BUDGET(quota:aiGatewayBudget)- Backend:
/ai/gateway/creditsendpoint →/ai/gateway/wallet, service methodgetCreditsRemaining()→getWallet()returning{ budget, balance } - Frontend: stores, composables, and components updated from
creditsRemaining/creditsQuotatobalance/budget,fetchCredits()→fetchWallet() - UI: all AI Gateway credit displays now show USD amounts (
$1.53 / $2.00 remaining) - Usage table column renamed from "Credits" to "Cost (USD)" with
$X.XXformatting - i18n strings updated to use balance/budget/wallet terminology
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/NODE-4834
Review / Merge checklist
- I have seen this code, I have run this code, and I take responsibility for this code.
- PR title and summary are descriptive. (conventions)
- Docs updated or follow-up ticket created.
- Tests included.
- PR Labeled with
Backport to Beta,Backport to Stable, orBackport to v1(if the PR is an urgent fix that needs to be backported)