Skip to main content
Launching the open-source gateway
<- Blog

Launch Week Day 5: Limits

Set spending guardrails on your AI gateway. Cap costs, requests, and tokens per API key with automatic warnings and blocks.

Frank Chen · April 24, 2026 · 2 min read

This is Day 5 of Respan Launch Week.

AI costs can spiral fast. One misconfigured agent loop, one unexpected traffic spike, and your monthly bill jumps by thousands. Limits gives you control over that.

What are Limits?

Limits are policies you attach to API keys or models in the Respan gateway. Each policy defines a metric, a time period, a threshold, and what happens when that threshold is crossed.

You can set policies on:

  • Cost - cap spending in dollars per hour, day, or month
  • Requests - limit the number of API calls
  • Tokens - cap total input/output tokens consumed

Warn or block

Each threshold has two modes:

Warns - when usage hits the threshold, you get a notification but requests keep flowing. Use this for soft budgets where you want visibility without interrupting production.

Blocks - when usage hits the threshold, the gateway rejects further requests with a 429 status. Use this for hard spending caps where you need to guarantee a ceiling.

You can stack both on the same policy. For example, warn at $50/hour and block at $100/hour.

Notifications

Every policy can send alerts when a threshold is crossed, so you can investigate before costs get out of hand. Two channels are supported:

  • Slack - paste a webhook URL and get alerts directly in your team's channel
  • Email - add team members who should be notified

No additional configuration needed. Just pick your channel and you're set.

How to set it up

Go to Limits in the Respan dashboard, create a new policy, and it takes effect immediately.

Why this matters

Without limits, a single runaway agent can burn through your entire monthly budget in hours. We've seen it happen. Limits gives you the same kind of spending controls that cloud providers offer for compute, but purpose-built for LLM usage.

Combined with Monitors from Day 1, you now have full cost observability and enforcement across your AI stack.


That wraps up Respan Launch Week! Here's everything we shipped:

To stay updated, follow us on X or join our Discord community.

You might also like

Built for AI agents.
Break less.
Ship more.