> ## Documentation Index
> Fetch the complete documentation index at: https://docs.infery.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quotas and presets

> Cap spend and traffic per user, per API key — with reusable presets.

Quotas prevent one runaway script or misbehaving key from draining your plan. They **cascade** from broad to narrow:

```
Platform defaults → Subscription plan → Member preset → API key preset
```

The tightest value wins. If your plan allows 120 req/min but a key preset says 30 — that key is capped at 30.

## What you can limit

| Limit                         | Meaning                                 |
| ----------------------------- | --------------------------------------- |
| `allowedModels`               | Whitelist of model slugs. `['*']` = all |
| `maxRequestsPerMinute`        | Sliding-window rate limit               |
| `maxTokensDaily`              | Hard cap on total tokens/day            |
| `maxBudgetMonthlyCredits`     | Credit budget per month                 |
| `maxFileSizeBytes`            | Largest single file upload              |
| `maxFilesPerWorkspace`        | Total number of stored files            |
| `maxStorageBytesPerWorkspace` | Total bytes across all files            |

## Presets

A **preset** is a named bundle of limits. Define once in Settings → Quotas and assign to members or API keys.

Common presets to start with:

* **Production** — no rate limit, allowed models = whitelist of blessed slugs, high storage
* **Development** — 30 rpm, 1M tokens/day, all models allowed
* **Read-only** — 10 rpm, no image/video generation, minimal storage

## Assigning a preset

**To a member:** Settings → Members → member row → **Quota preset**. Their API keys inherit automatically unless the key has its own preset.

**To an API key:** Settings → API Keys → key row → **Preset**. Overrides the member's preset for that specific key.

## Seeing effective quota

Each key row in Settings → API Keys shows the **resolved quota** — the final values after cascade — with a source column (`platform` / `plan` / `member` / `key`) so you know where each limit comes from.

## API visibility

Clients see quotas in error responses:

```json theme={null}
{
  "error": {
    "message": "Rate limit: 30 req/min on this API key",
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded"
  }
}
```

And storage-related 413 responses from `/v1/files`:

```json theme={null}
{
  "error": {
    "message": "Storage quota exceeded (5.4GB / 5.0GB used)",
    "type": "invalid_request_error",
    "code": "storage_quota_exceeded"
  }
}
```
