Put a hard ceiling on
AI costs
Enforce project and workflow budgets before requests reach a provider. Stop runaway spend in real time, not after the invoice arrives.
One bad prompt loop can burn through thousands of dollars in minutes. ModelRiver stops requests before costs spiral.
- Block requests before they reach providers
- Cap spend at the project level and on individual models
- Prevent surprise invoices from accidental overspending
- Enforce budgets in real time on every live request
How cost protection works
Every AI request is checked
before money is spent.
ModelRiver sits between your app and AI providers, blocking requests that exceed budget before any charges occur.
Reset schedule
Hourly to monthly
Keep teams within AI spend policies with predictable budget resets: hourly, daily, weekly, or monthly.
Two safety nets
Project + model
Protect shared project budgets and cap expensive models individually, so one runaway workflow cannot drain the whole team.
Stops before billing
Before each call
Avoid unexpected provider invoices. Over-budget requests are blocked or rerouted before ModelRiver calls your AI provider.
Plain language
Protect AI spending at every level
Not sure which setting does what? Here is a simple guide: each control protects your AI spend in a different way.
Spending limit
Your whole-project budget
Sets a maximum dollar amount for all live AI usage in a project. When it is full, new requests stop. That is your safety net against runaway bills.
Think of it as: a monthly credit card limit for your entire AI project.
Cost guardrail
Per-model budget
Caps spend on one AI model inside a workflow (primary or backup). When that model hits its cap, ModelRiver skips it and tries the next backup instead.
Think of it as: a daily allowance for each AI model you use.
Rate limits
Traffic speed limit
Limits how many requests can run in a time window. Stops abuse and traffic spikes, but does not cap how much money you spend.
Not the same as: a spending limit. Learn about rate limits for traffic control.
Input guardrails
Content safety filter
Blocks harmful or unsafe prompts before they reach an AI provider. Protects content quality, not your wallet.
Different problem: learn about guardrails for prompt safety.
How it works
Set limits in the console, enforced on every request
No config files or code changes needed. Open Project Settings or the workflow editor, enter a dollar amount, and ModelRiver handles the rest.
Project spending limit
Maximum total spend across all live workflows.
$200.00 spent · $50.00 remaining
Model budgets
Settings are saved in your ModelRiver project. Update them anytime from the dashboard.
Enter your budgets
Set a project-wide limit under Settings, then add per-model caps in each workflow's Cost guardrail section.
Watch usage on Overview
See progress bars for each budget, warnings at 80% used, and which workflows are closest to their limit.
Over-budget requests are handled automatically
Full model budgets skip to the next backup. A full project budget stops the request entirely, before any provider is charged.
Two-level protection
Cap individual models first, then add a project safety net
Most teams start by limiting expensive AI models, then set a project-wide backstop once they know their typical spend. Both are configured the same way: pick an amount and a reset schedule.
Project spending limit
Quick amounts
The limit resets at the start of each hour, day, week, or month (UTC).
Your project backstop
$250.00 per day across all live workflows
Workflow cost guardrail
Quick amounts
When this model reaches its budget, ModelRiver skips it and tries Backup 1.
$16.00 / $20.00 per day · $4.00 remaining
This model slot
$20.00 per day on primary, then failover to backups
When a limit is reached
What happens next, in plain terms
ModelRiver checks budgets before every AI call. Here is the decision path, and what your team or app will see at each step.
A live request comes in
From your app, playground, or any production workflow
Is the project budget full?
If yes → request is stopped immediately. No backup models are tried.
Is this model over its budget?
If yes → skip this model and try the next backup automatically.
Everything is recorded
Skipped models and blocked requests show up in Request Logs and on Overview.
Three possible outcomes
Request goes through
Budget has room. ModelRiver calls the AI provider and your app gets a normal response.
Model switched to backup
One model hit its cap, so ModelRiver tries the next backup model instead. Your workflow keeps running.
Request stopped
The project budget is full, or every model tried is over its cap. Your app gets a clear budget error with no provider charge.
Real-world example
What happens when a budget is exceeded
A typical production setup with a project backstop and per-model caps, and how ModelRiver responds at each level.
Project spending limit
$500 / week
Final safety net across all live workflows in the project.
Primary model cap
Claude · $50 / day
Cost guardrail on the primary model in your busiest workflow.
Backup model cap
GPT · $100 / day
Separate cap on the fallback model so failover stays affordable.
Claude reaches $50 for the day
ModelRiver skips Claude and tries the GPT backup automatically. Your workflow keeps running with no manual intervention.
Both Claude and GPT are over budget
The request fails with a clear budget error. No provider is called, so nothing new is charged.
Project spend reaches $500 for the week
New requests are blocked immediately, even if individual models still show budget left. No backups are tried. Your app gets a structured budget_exceeded error.
Who uses it
Built for teams that need cost control without slowing down
Product, finance, and engineering share one dashboard. No custom billing code required.
Product teams
Ship beta features with a hard cap
Test new AI workflows without an open-ended bill while you validate product-market fit.
Engineering
Keep failover costs predictable
Budget expensive backup models separately so auto-failover does not blow through your project limit.
Finance & ops
Track burn without spreadsheets
See live spend on Overview instead of reconciling provider invoices at month end.
For developers
Clear error messages when a limit is hit
When a budget blocks a request, your app gets a structured error with the limit amount, how much was spent, and when the budget resets. No guessing why a call failed.
Project budget full
The request is blocked immediately. Your app receives a budget_exceeded error with the limit and reset time.
Model budget full
That model is skipped silently. ModelRiver tries the next backup. The skip is logged in Request Logs with the reason.
All models over budget
Same as a project block: the request fails with a budget error. No provider is called, so no charge is incurred.
Example response
// Project budget reached { "error": { "type": "budget_exceeded", "message": "Project spending limit reached", "limit_usd": 250.00, "spent_usd": 250.00, "period": "weekly", "reset_at": "2026-07-13T00:00:00Z" } }
FAQ
Common questions about spending limits
Quick answers for product, finance, and engineering teams, without ModelRiver jargon.
How do I set AI spending limits in ModelRiver?
Open Project Settings and set a project-wide spending limit with a maximum USD amount and reset period. For finer control, edit a workflow and set a cost guardrail on the primary or backup model slots.
What is an AI budget guardrail?
A budget guardrail is a per-model spending cap inside a workflow. When that model reaches its limit, ModelRiver skips it and tries the next backup model instead of sending more spend to the provider.
What happens when an AI workflow reaches its budget?
If a workflow model slot hits its cap, that model is skipped and failover continues. If every attempted model is over budget, the request fails. If the project-wide spending limit is reached, new requests are blocked immediately with no failover.
Are spending limits different from rate limits?
Yes. Spending limits cap estimated USD spend over a time period. Rate limits control request volume. Use both when you need cost ceilings and traffic protection.
Are spending limits different from input guardrails?
Yes. Input guardrails block unsafe content. Spending limits block requests when a budget threshold is reached. They solve different problems.
Can I monitor AI budget usage without reading logs?
Yes. The Overview page shows project spend vs cap, workflow-level utilization, and summary chips for protected workflows, models running low, and models at limit.
Ship AI features without surprise bills
Put a hard cap on your AI spending before your next deploy. Set project and workflow budgets in minutes, watch usage live on Overview, and stop over-budget requests before they reach a provider.