Docs menu
Platform

Rate limits & quotas

Three guards keep spending predictable: a per-key rate limit, per-key spend limits, and an up-front balance check.

Rate limits

Each key is limited to a number of requests per minute (600 by default). Over the limit, Sluice returns 429 rate_limit_exceeded with a Retry-After header — the official OpenAI SDKs back off and retry on this automatically.

Spend limits

Any key can carry a maximum spend, set on the API keys page. Once a key reaches it, that key gets 403 key_spend_limit_reached until you raise it; your other keys are unaffected. It's the simplest way to cap a single app or environment.

Balance checks

Sluice is prepaid, so before a call runs it reserves the worst-case cost (your prompt plus the maximum output at the priciest candidate provider). If your balance can't cover it, the request is refused with 402 insufficient_balance before any provider is called — you're never billed for a call that couldn't complete.

429 rate_limit_exceeded
Too many requests per minute for this key. Honor Retry-After.
403 key_spend_limit_reached
This key hit its spend limit. Raise it in the dashboard.
402 insufficient_balance
Not enough credit for the worst-case cost. Top up.
Requests without max_tokens
If you don't set max_tokens, Sluice assumes a default output size for the reservation. A long answer can take the balance slightly negative; the next request is then refused until you top up.