{"slug": "budgets-for-api-keys-on-ai-gateway", "title": "Budgets for API keys on AI Gateway", "summary": "Vercel has introduced spend caps for API keys on its AI Gateway, allowing users to set a dollar limit that automatically rejects further requests once exceeded. The feature applies across all AI Gateway providers and models, addressing unpredictable costs from autonomous workflows, shared demos, and developer experimentation. Users can configure budgets via the AI Gateway API Keys page or programmatically through the Vercel CLI, with optional daily, weekly, or monthly reset periods.", "body_md": "AI costs are getting harder to forecast. As teams lean more on coding agents and other token-heavy workflows, a key can burn cost faster than anyone notices:\n\nAutonomous workflows that can loop or fan out without supervision\n\nDemos and prototypes that could catch unexpected traffic if shared or shipped\n\nDevelopers exploring or experimenting without a sense of per-model cost\n\nSet a spend cap on any key, and [AI Gateway](https://vercel.com/ai-gateway) rejects further requests on that key once the limit is exceeded, until the budget resets or you raise it. The cap applies to all AI Gateway providers and models running through the key, making it easier to consolidate and govern AI costs.\n\nOn the [AI Gateway API Keys page](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai-gateway%2Fapi-keys&title=AI+Gateway+API+Keys), click **Create Key**, enable the **Spend Quota** option, enter a limit in dollars, and choose a refresh period.\n\nYou can also edit existing keys and add, change, or remove budgets by clicking the right hand side ... menu and **Edit Key**.\n\nCreate a budgeted API key programmatically via the Vercel CLI. The format is:\n\nPair a key with an optional refresh period (`daily`\n\n, `weekly`\n\n, `monthly`\n\n, or `none`\n\n) to scope the limit to a window. Each period resets at the start of its window in UTC.\n\nKeys created programmatically will also appear in your team [AI Gateway API Keys view](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai-gateway%2Fapi-keys&title=AI+Gateway+API+Keys), so you can see all keys in one place.\n\nRead the [API keys documentation](https://vercel.com/docs/ai-gateway/authentication-and-byok/api-keys) for more information about setting and using budgets for API keys.", "url": "https://wpnews.pro/news/budgets-for-api-keys-on-ai-gateway", "canonical_source": "https://vercel.com/changelog/budgets-for-api-keys-on-ai-gateway", "published_at": "2026-06-09 00:00:00+00:00", "updated_at": "2026-06-11 17:38:11.716329+00:00", "lang": "en", "topics": ["ai-tools", "ai-infrastructure", "ai-products", "ai-agents", "mlops"], "entities": ["AI Gateway", "Vercel"], "alternates": {"html": "https://wpnews.pro/news/budgets-for-api-keys-on-ai-gateway", "markdown": "https://wpnews.pro/news/budgets-for-api-keys-on-ai-gateway.md", "text": "https://wpnews.pro/news/budgets-for-api-keys-on-ai-gateway.txt", "jsonld": "https://wpnews.pro/news/budgets-for-api-keys-on-ai-gateway.jsonld"}}