# Limits

Each limit on API keys, the AI Gateway, webhooks, sandboxes and credits returns an error that names it when you go over: wait, raise the limit or send less.

| Limit                            | Value                                                    | When exceeded                                |
| -------------------------------- | -------------------------------------------------------- | -------------------------------------------- |
| Requests per minute, per API key | 1 to 10,000, set on the key; unset means no limit        | `429` `key-rate-limited`, with `Retry-After` |
| Models per API key               | Up to 100 on the key's model list; unset means any model | `403` `key-model-denied`                     |
| AI Gateway request body          | 32 MiB                                                   | `413` `request_too_large`                    |
| Webhook payload                  | 64 KiB                                                   | `413` `webhook-payload-too-large`            |
| Sandbox lifetime                 | Up to 24 hours, or always on                             | The sandbox is cleaned up                    |

## Rate limits

A key's requests per minute count the inference calls it makes, to the AI Gateway. Set them when you create the key or later with `PUT /api-keys/{id}/limits`, alongside the models the key may call. A limit on the model's provider also comes back as `429`, in the same envelope, with the provider's `Retry-After`.

## Credits and budgets

Model calls spend the account's credits. Free includes 50 credits a month; Pro includes 200 credits per seat a month; Enterprise sets its own. When the credits run out, the call fails with `402` `insufficient-credits`. A monthly AI budget, set on the account, fails with `402` `ai-budget-exceeded` once it is reached, and resets the next month.

## Plans

|          | Free       | Pro                  |
| -------- | ---------- | -------------------- |
| Credits  | 50 a month | 200 per seat a month |
| Storage  | 5 GB       | 20 GB                |
| Projects | Unlimited  | Unlimited            |

The balance, usage and budgets are on the account's Credits and Spend pages.
