Solution
Production cost control
Deploy AI features without runaway inference costs. Prepaid credits enforce a hard spend cap, per-key budgets isolate dev from production, and real-time usage monitoring catches anomalies before they drain the account. Built for teams that need predictable spend in production.
The problem
You deploy an LLM-powered feature. Usage is steady for two weeks. On week three, a prompt injection causes a loop that sends 50,000 requests in 12 minutes. By the time you notice, your metered inference bill is $18,000.
Or: a junior engineer hardcodes an API key in a public repo. A scraper finds it, uses your credits to run batch inference jobs, and your account is drained before the alert fires.
Or: staging traffic spikes during load testing, and because staging shares the same billing account as production, your monthly invoice doubles unexpectedly.
Metered billing with soft limits does not prevent these scenarios. A hard cap does.
How Rhodes solves it
Prepaid balance = hard cap
You top up $500. When $500 of inference is consumed, every key stops serving and returns 402. No overage, no invoice shock, no midnight oncall to shut off traffic.
Per-key budgets
Limit each credential individually. Give staging keys a $50 cap, production a $400 cap. If staging goes haywire, it burns its $50 and stops — production keeps running.
Real-time usage API
Poll GET /v1/usage for current spend. Alert when any key crosses 80% of its budget. Webhook on every $10 increment if you want sub-minute granularity.
Budget enforcement
// Set per-key budget — protects from runaway loops
POST /v1/keys
{
"name": "staging-api-key",
"max_budget": 50.00 // This key stops at $50 spend
}
// Account-level balance is the master cap
// All keys under the account share one prepaid balance
// When account balance hits zero, all keys stop When balance hits zero, requests stop. The prepaid amount is the maximum you can spend.
Credit verification happens before proxying the request to the upstream.
Who this is for
Startups with tight budgets
You raised $500k and need to ship an AI feature without risking $10k+ surprise bills. Top up what you can afford to lose, deploy, and know the spend stops at that number.
Teams with staging/prod isolation
Production keys have high budgets, staging keys have low ones. Load tests do not threaten production spend. Developers can experiment without worrying about cost.
Finance teams that hate accrued invoices
Prepaid means no accounts payable surprises. You pay up front, spend down, top up again. The balance sheet reflects actual spend, not a liability accruing through the month.
Security-conscious orgs
If a key leaks, the damage is capped. An attacker can drain that key's budget, but cannot exceed it or touch other keys. Rotate the key, top up if needed, keep running.
Frequently asked questions
What happens when a key hits its budget?
Requests using that key return 402 Payment Required. Other keys under the same account continue working until the account balance runs out. This is useful for isolating staging or dev keys from production spend.
Can a key exceed its budget if requests come in simultaneously?
No. The budget check happens before the request is proxied. If 10 requests arrive at once and the 3rd one crosses the limit, requests 4-10 are rejected immediately. No credit is consumed after the cap.
How do I monitor spend in real-time?
GET /v1/usage returns current spend by key and by model. The dashboard at app.rhodes.ai updates every 60 seconds. For sub-second monitoring, poll the usage endpoint or subscribe to webhooks.
Is there a monthly spend limit separate from the balance?
No. The only cap is the prepaid balance. If you top up $1000 and want to prevent more than $200 from being spent this month, set key budgets that sum to $200. When those keys hit their limits, traffic stops even if account balance remains.
Deploy with a hard cap
Top up $10, set key budgets, route production traffic. See the prepaid model in practice.