Budget limits for AI agents that stop a runaway run before the invoice does.
A monthly provider bill tells you what went wrong after the fact. OpenPike enforces limits on each request: a hard budget blocks spend at a ceiling, loop detection pauses an agent within a minute, and run limits cap a single task.
Three limits, from fast to slow
Pause in a minute
Requests or spend per minute over a limit pause the key or tag for a set time, default 5 minutes. A fast retry loop is stopped before the next minute.
Block at a ceiling
A daily or monthly hard limit refuses requests once spend reaches it, until the period resets. A soft limit sends an alert first.
Cap each task
Name a run with x-openpike-run and cap its spend, requests or time. A slow loop that stays under the per-minute limit still stops.
Scope each limit to one agent
Give each agent a tag such as agent=pr-reviewer. A budget on that tag applies to every request carrying it, from any key, so one agent can be stopped without touching the others.
- ScopesWorkspace, one virtual key, or one tag, by hour, day or month.
- Every match appliesA request counts against the workspace, key and tag budgets at once, and any one of them can block it.
- Clear errorsA blocked request gets a 429 with a code such as
budget_exceededorloop_detected, and aretry-afterheader where a wait makes sense.
What the limits cannot do
- Stop the request that crosses a limit.Cost is known only when a response ends, so the request that crosses a spend limit completes. The next one is refused. Set the hard limit a little below the amount you must not exceed.
- Count spend for a model with no price.A model with no known price has no cost, so it adds nothing to a budget. It still counts toward request limits.
- Limit traffic that skips the gateway.Requests sent straight to a provider are not counted. Point each agent at OpenPike and keep its provider keys out of its environment.
Cap the next agent before it runs.
Free for 3 keys and 10,000 requests a month. Loop detection is on Team and Business.
Start free