Spending limits by provider
Hard caps for OpenAI, Azure, Gemini, Claude, OpenRouter, xAI, Mistral and DeepSeek.
- OpenAIHow to put a hard spending limit on the OpenAI APICap what an app can spend on OpenAI per day or per month. Requests that would cross the limit are refused before they reach OpenAI.
- AnthropicHow to cap Claude API spendGive each app that calls Claude its own dollar ceiling. Fuse stores your Anthropic key and refuses the request that would cross the budget.
- GoogleHow to cap Google Gemini API spendPut a hard dollar ceiling in front of Gemini. Fuse uses Google's OpenAI-compatible endpoint and refuses requests that would cross your budget.
- EnvironmentsSeparate LLM API budgets for staging and productionStop a test suite or staging bug from spending the production budget. Give each environment a Fuse key with its own cap.
- Azure OpenAIHow to put a hard spending limit on Azure OpenAIAzure OpenAI has budgets and alerts but no native dollar cap per deployment. What Microsoft suggests, and how to enforce a real daily or monthly ceiling.
- OpenAIOpenAI project budget limits: what they do and what they don'tOpenAI projects can enforce a monthly hard limit. Where it stops, where it can overshoot, and how to add daily, per-key and per-customer caps.
- Google CloudGoogle Cloud billing hard limit for Gemini: the options, honestly comparedGoogle Cloud budgets only alert. Spend cap budgets, the disable-billing function, and a per-request ceiling: how each one stops Gemini spend, and what each one costs you.
- OpenRouterOpenRouter spending limits: key caps, and what to add on topOpenRouter lets you cap credit per API key. How to use it, what it covers, and how to add per-customer and per-feature budgets for your own app.
- xAIxAI Grok API spending limit: credits, invoiced limits and daily capsHow xAI's prepaid credits and invoiced spending limit control Grok API spend, and how to add daily, per-key and per-customer ceilings.
- MistralMistral API spending limit: organization and workspace capsMistral lets you set monthly spending limits for the organization and each workspace. How to use them, and how to add daily and per-customer limits.
- DeepSeekCap DeepSeek API cost after the V4 price changeDeepSeek raised V4 prices in August 2026 and added peak and off-peak rates. Add it as a custom provider and type the peak price so the ceiling holds.
Leaked keys, errors and surprises
What to do when a key leaks, a billing error stops your app, or the numbers lag.
- MonitoringGet alerted when LLM spend spikesA ceiling stops the bill; an anomaly alert tells you something is wrong while there is still budget left. Here is how to set both up.
- GeminiGemini API key leaked? What to do in the first hourYour Gemini API key ended up in a public repo, an app bundle or a screenshot. Kill it, check what it cost, and make the next leak cheap.
- OpenAIOpenAI API key leaked? Revoke, check, and cap the next oneAn OpenAI key was pushed to GitHub, pasted in a chat or shipped in an app. How to revoke it, find out what it cost, and stop the next leak from costing much.
- OpenAIOpenAI billing_hard_limit_reached: what it means and how to fix itYour OpenAI calls fail with billing_hard_limit_reached. The usual causes (no credit, a budget you set, the wrong project) and how to stop it from taking your app down.
- OpenAIOpenAI usage dashboard not updating? Why it lags, and how to see spend liveOpenAI's usage numbers trail real traffic by minutes, sometimes much longer. Why that matters for runaway costs, and how to count spend per request as it happens.
- OpenAIRotate an OpenAI API key without redeploying every appSwap the OpenAI key inside Fuse, keep the app on its Fuse key, and set an expiry so the next rotation is a date rather than an outage.
Agents, frameworks and your stack
Coding agents, CrewAI, LangGraph, Dify, n8n, the Vercel AI SDK, and loops that will not stop on their own.
- AgentsHow to stop a runaway AI agent loop before it bills youAgents that retry or never decide they are done can send thousands of requests. Give each agent a key with its own ceiling so a loop stops itself.
- ErrorsHandle an API spending limit (HTTP 402) gracefullyWhat the 402 fuse_blown response contains and how to turn it into a fallback, a queue, or a clear message for the user.
- n8nStop an n8n AI agent from looping (and burning your API budget)An n8n AI Agent keeps calling tools, or a workflow keeps re-triggering. Cap iterations, guard expensive tools, and put a hard dollar ceiling under the whole thing.
- n8nTrack token usage and cost in n8n, per workflowSee what each n8n workflow spends on OpenAI, Claude or Gemini, without building a spreadsheet: one key per workflow, spend per day, and caps.
- Vercel AI SDKCost tracking for the Vercel AI SDK, per user and per featureThe AI SDK reports token usage. Turn it into dollars per user and per feature, and stop spend at a ceiling, with two lines of setup.
- FallbacksLLM model fallback for budgets: degrade instead of going downSwitch to a cheaper model automatically as spend nears your ceiling, instead of refusing requests. How budget fallback works and when to use it.
- Claude CodePut a spending limit on Claude Code API usageClaude Code can bill an API workspace with no per-session dollar stop. Separate that key, set Anthropic's spend cap, and keep app traffic behind Fuse.
- CursorSet a Cursor spend limit when you bring your own keyCursor's spend limit is on Cursor's invoice. A key you paste is billed by the provider. Point the OpenAI base URL override at Fuse to cap that bill.
- CrewAIWhat a CrewAI crew costs, and how to cap itCrewAI's max_iter stops an agent after a number of steps. It does not know the price of a step. Point the LLM base URL at Fuse for a dollar ceiling.
- LangGraphTrack LangGraph token usage, then stop it at a dollar ceilingLangGraph event streams report tokens after each model call. Point ChatOpenAI at Fuse to turn those tokens into a budget that refuses the next call.
- ClineCap what Cline can spend on API callsA Cline session on a long-context model can spend hundreds of dollars in a day. Give it a Fuse key with a daily cap so the next request stops.
- Codex CLICap Codex CLI cost per sessionCodex CLI speaks the Responses API and has no dollar ceiling of its own. Point a custom provider at Fuse so a session stops at a budget.
- Agents SDKPut a cost limit on the OpenAI Agents SDKThe Agents SDK reports usage after a run. A loop of thousands of calls is already billed by then. Point the default client at Fuse so the next call can be refused.
- DifyDify token usage, and a price that stops the next callDify shows tokens per message. It does not refuse a model call because a dollar amount was reached. Set the provider base URL to Fuse.
- Pydantic AIPydantic AI cost tracking that can also stop a runPydantic AI records tokens and a best-effort cost on each run. UsageLimits checks that cost after the provider has answered. Fuse refuses the call first.
- ContinueContinue.dev pricing is the model you configureContinue's plan and the model bill are different charges. Point the OpenAI-compatible apiBase at Fuse to cap what the editor can spend.
- ClaudeClaude MCP cost: tool schemas are input tokensMCP tool definitions are resent on every turn. One session measured about 27,000 tokens of tools before the first prompt. Fewer servers, and a ceiling on clients you can proxy.
Cost per customer and per month
What an AI feature really costs, and how to keep it there.
- Unit economicsHow to track OpenAI cost per customer (and cap it)Know what each of your customers costs in LLM calls, set a budget per customer, and stop one heavy user from eating your margin.
- Unit economicsWhat does an AI agent cost per month? A simple way to work it outRuns per day, steps per run, tokens per step: a worked example of what an AI agent costs per month, and why the real number is usually higher.
- OpenAIWhat OpenAI reasoning tokens costReasoning tokens are billed as output, including tokens you never see in the answer. Cap max completion tokens and put a dollar ceiling in front of the key.
- GeminiWhat Gemini thinking tokens costGemini bills thinking tokens, usually at the output rate, on top of the short answer you see. Set a max token cap that includes them, and a dollar ceiling.
- ClaudeWhy Claude computer use costs so much per taskComputer use resends screenshots and history on every step, so one task can cost tens of dollars. Fuse cannot price those image inputs. Cap the text planner, and cap the step count.
- OpenAIWhat the OpenAI image generation API costsPriced image models bill a listed amount per image, times how many you ask for. Fuse reserves that price before the call. Token-only image models are refused.
Compare tools and approaches
- CompareHard spending ceilings vs billing alertsBilling alerts tell you after money is spent. A hard ceiling refuses the request before it is sent. How they differ, and when an alert is enough.
- CompareFuse vs building your own LLM budget counterWhat it takes to enforce a dollar budget on LLM calls yourself: pricing, concurrency, streaming, settlement. And when building it is the right call.
- CompareDollar ceilings vs rate limits for LLM APIsRequests per minute is not dollars per day. Why rate limits do not cap LLM cost, and how a dollar ceiling does.
- CompareLLM budget trackers compared: tracking vs enforcing spendProvider dashboards, provider limits, observability tools, self-hosted gateways and per-request ceilings: what each LLM budget tracker actually does when spend runs away.
- CompareFuse vs LiteLLM budgets: hosted ceilings or a self-hosted gatewayLiteLLM's proxy can set budgets per key, team, user and customer. How that compares with Fuse's hosted per-request ceilings, and when to pick each.
- CompareHelicone alternatives after the Mintlify acquisitionHelicone is in maintenance mode after Mintlify acquired it. What it did for you, and which alternatives cover logging, gateways and spending limits.
- ComparePortkey alternatives for a budget on every planPortkey budget limits are on the Enterprise plan and some Pro plans. Fuse includes a hard ceiling on the free Hobby plan, checked before the provider is called.
- CompareLangfuse cost tracking versus a ceiling that blocks the callLangfuse records tokens and cost after the provider answers, and can alert you. Fuse prices the request first and refuses the one that would cross a ceiling.
- CompareVercel AI Gateway pricing, and the keys you already pay forVercel AI Gateway already has budgets on team, project, key, and user spend. Those budgets do not count what your own provider keys spend. Fuse does.
Tools and reference
- Free toolToken counter and cost checkPaste a prompt and see its exact OpenAI token count, and what it costs as input or output on any model.
- Free toolLLM API pricing comparisonCurrent per-token prices for OpenAI, Claude, Gemini, Mistral and Grok models side by side, with the cost of a typical request.
- Free toolOpenAI and LLM API cost calculatorRequests per day and tokens per request in, monthly bill out, for up to three models at once, with prompt caching.
- Free toolLLM budget calculatorHow many requests a daily or monthly budget really buys, typical and worst case, once max_tokens is counted.
- Free toolEmbedding cost calculatorWhat it costs to embed a document set with OpenAI, Gemini or Mistral embedding models, from pages or word counts.
- Free toolAI agent cost calculatorCost per run, per day and per month for an agent whose context grows every step, plus what one runaway run costs.
- Free toolRunaway loop cost calculatorWhat a stuck retry loop or agent costs by morning, with and without a hard dollar ceiling.
- ReferenceLLM API cost glossaryCeilings, reservations, settlement, output caps and more, in plain words.