Limits
Rate limits and the size of a single request.
Rate limits
Each key gets its own allowance of 60 requests per minute by default. You can set a different one per key when you create it, up to 10,000. Keys do not share a budget, so a busy integration cannot starve a quiet one.
Over the limit you get 429 rate_limit_exceeded with a Retry-After header in seconds. The check runs before the body is read, so a throttled request costs you nothing.
Request size
| Limit | Value | Error |
|---|---|---|
| Request body | 8 MB | 413 request_too_large |
| Messages | 1,000 | 400 too_many_messages |
| Tools | 128 | 400 too_many_tools |
| Images | 8, each under 5 MB | 400 too_many_images |
| Audio clips | 4, each under 5 MB | 400 too_many_audio |
| Videos | 2, each under 5 MB | 400 too_many_video |
A model's own context window is separate and usually the tighter constraint. Exceeding it comes back as 400 upstream_validation.
Spending limits
Three caps can refuse a request before it runs: the key's own credit limit, the workspace budget, and any guardrail covering that key. The error message names the one that stopped you. See Billing.