Spend caps

The limits that stop a FluxRouter request today, the caps you can set yourself, what each one is measured on, and how the account ceiling rises over time.

A spend cap stops requests before a loop, a leaked key or an over-eager script can run up a bill you did not expect. Some caps you set yourself; one is a safety ceiling on every paid account. This page says what stops a request today, and where a limit is saved but not enforced yet, it says so.

Caps you set yourself

CapWhere you set itWhat it countsWhat happens
Daily cap/home/billing, on prepaid credityour credit spend that day (UTC)402 daily_cap until midnight UTC
Monthly cap/home/billing, on prepaid credityour credit spend that month402 monthly_cap until the next month
Prepaid balancethe amount you top upyour credit balance402 credit_exhausted until you top up

These are measured on what you are actually charged, so they are the limits to use if you want spend to stop at a number you choose.

Per-key limits

When you create or edit a key at /home/keys you can give it a monthly spend limit, a monthly token limit and an expiry date. These are saved on the key but not enforced by the gateway yet. Until they are, use a prepaid daily or monthly cap to bound spend, and revoke a key you no longer need.

A key can also carry a lifetime cap. When it is reached, that key is refused with 402 key_lifetime_cap_exhausted; your other keys keep working.

Limits on every account

LimitApplies toWhat happens
Free plan capFree accounts402 free_tier_exhausted when the monthly credit is used, or 429 free_cap_reached when the monthly token allowance is used. See The Free plan.
Account monthly ceilingall paid accounts, including prepaid402 account_monthly_budget_exhausted

The account monthly ceiling is a runaway-cost brake, not a promise that your bill stops at a given figure. It is measured on Flux's cost of routing your traffic rather than on your charge, so your billed usage can pass the ceiling figure before it applies. If you need a bill that stops at a number, use prepaid credit with your own daily or monthly cap.

A top-up does not clear the account ceiling. Every refusal code and its fix is in the error reference.

Does the ceiling go up over time?

Yes, on paid plans. It starts modest and rises automatically as you build a payment history: with cleared spend (usage that has been paid and not disputed) and with account age. You do not need to do anything. Enterprise accounts are governed by their contract instead.

If you have a near-term need above your current ceiling, such as a launch or a large batch job, email support at fluxrouter dot ai to discuss raising it ahead of schedule.

Where do I see my spend?

Your current spend and remaining headroom are at /home/usage. See Usage and invoices.