Skip to main content
ZeroGen limits how many requests your keys send and how many generations they run at once. A request over a limit fails with 429 rate_limited and a Retry-After header.

Request limits

Every authenticated request counts against two windows: Reads, waits, and writes all count. So does a request that ZeroGen refuses after it checks the key, such as one that lacks a scope or has an invalid body, so fix a failing request before you retry it. A request doesn’t count against either window when a rate limit refuses it, when its API key is invalid, when it comes from a browser, or when it names an unknown endpoint or a method the endpoint doesn’t accept. Each window lasts 60 seconds from the first request it counts. When a window ends, the next request starts a new one. Test keys count against a separate user window of their own, so test traffic never uses up live requests. Each test key still has its own 60-request window.

Rate limit headers

Every authenticated response carries the state of the window that’s closest to refusing: Pace your client by these headers rather than by the limits on this page.

When you’re over the limit

A request over a limit fails with 429 and a rate_limited error. Its Retry-After header gives the number of seconds to wait before every full window has room again:
Wait at least Retry-After seconds, then retry the same request. Retry a POST with the same Idempotency-Key; a 429 is never stored as the request’s outcome, so the retry runs. For details, see Idempotency.

Running generations

Each organization’s keys can have a limited number of generations queued or running at once: These caps count only generations that API keys started; generations your team starts in ZeroGen don’t count toward them. ZeroGen also stops admitting API generations while the platform is at capacity. A create over a cap, or while the platform is at capacity, fails with 429 rate_limited and Retry-After: 60, and starts nothing. Retry it after one of your generations ends.

URL imports

ZeroGen limits how much it downloads for each organization’s https URL inputs. Each organization can run up to 4 URL imports at once and import up to 10 GiB in 24 hours. A request over either limit fails with 429 rate_limited. To send larger or more files, upload them instead. For details, see Uploads and URL inputs.