Rate limits & spend caps

Per-key limits you can read off every response.

Limits apply per key — never per account, never shared across integrations. Both the request budget and the dollar budget are visible in headers and response bodies, so your client can self-throttle instead of guessing.

Request rate limits

A key may sustain 2 requests/second with bursts up to 30 requests. Every response — success or failure — carries OpenAI/OpenRouter-style headers describing the key's bucket:

HeaderMeaning
x-ratelimit-limit-requestsThe burst capacity of the key's bucket (30 on current keys).
x-ratelimit-remaining-requestsRequests left in the burst right now.
x-ratelimit-reset-requestsSeconds until at least one request is available again. Present only when you are being throttled.

Exceed the bucket and the request is refused with 429 Too Many Requests (the same three headers are still set). Read x-ratelimit-reset-requests, wait that long, retry once. The bucket refills continuously at 2 requests/second.

Spend caps (per-key credit limit)

Each key can carry a lifetime spend cap in dollars, set at creation and editable any time from the keys page. The cap bounds what a leaked or runaway integration can cost.

  • Capped keys report headroom in every response: webel.limit_microusd (the cap) and webel.limit_remaining_microusd (what's left), both in millionths of a dollar. Uncapped keys omit these fields.
  • When remaining headroom reaches zero, the next request fails with 402 Payment Required.
  • A request that starts under the cap may finish slightly over it — cost is known only after the model call, so the check happens before the request runs. Budget for one request of overshoot.
  • Raising a cap takes effect immediately; no new key or redeploy needed.

Seeing your spend

You never need to poll for cost:

  • usage.cost_microusd in every response is that call's exact cost — sum it client-side for live dashboards.
  • The keys page shows accumulated charges per key alongside its cap and last-used time.
  • Compute passes through at cost — Webel adds no markup to API usage (see pricing).
💡Hard-budget pattern: set the key's cap as your true ceiling, then alert client-side when webel.limit_remaining_microusd crosses a threshold (say 20%). The server-side cap catches what your alert misses.