Skip to main content

Budgets for API keys on AI Gateway

By Steven Van ·

Vercel lets teams cap AI Gateway API keys at a dollar limit, with daily, weekly or monthly resets, to stop runaway agent spend.

AI Gateway API keys on Vercel can now carry a spend cap. Set a limit in dollars on any key, and once it's exceeded the Gateway rejects further requests on that key until the budget resets or someone raises it. The cap covers every provider and model running through the key, so a single limit governs all spend on it.

  • In the dashboard, click Create Key, enable Spend Quota, enter a dollar limit and choose a refresh period. Existing keys can have a budget added, changed or removed from their Edit Key menu.
  • From the CLI, run vercel ai-gateway api-keys create --name NAME --budget DOLLARS --refresh-period PERIOD, with a refresh period of daily, weekly, monthly or none. Each period resets at the start of its window in UTC.
  • Keys created via the CLI also show up in the team's AI Gateway API Keys view.

Read the announcement for more.

Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →

Read the original announcement →

Read Budgets for API keys on AI Gateway on Creators Toolbox