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

# Rate limits and quotas

> Handle YALG monthly quotas, per-minute limits, and limit headers.

YALG enforces both monthly quotas and per-minute rate limits for API-key traffic.

## Default limits

| Plan                      |            Monthly quota |     Per-minute limit |
| ------------------------- | -----------------------: | -------------------: |
| Starter                   |              1,000 calls |               60/min |
| Professional and lifetime |             10,000 calls |              300/min |
| Enterprise                | 100,000 calls by default | 1,000/min by default |

Enterprise plans can override monthly API calls and per-minute limits.

## Response headers

| Header                  | Description                                       |
| ----------------------- | ------------------------------------------------- |
| `X-RateLimit-Limit`     | Per-minute request limit.                         |
| `X-RateLimit-Remaining` | Requests remaining in the current minute window.  |
| `X-RateLimit-Reset`     | Time when the current minute window resets.       |
| `X-Quota-Limit`         | Monthly API call quota.                           |
| `X-Quota-Remaining`     | Monthly calls remaining.                          |
| `X-Quota-Reset`         | Time when the monthly quota resets.               |
| `Retry-After`           | Seconds to wait before retrying a `429` response. |

## 429 responses

When quota or rate limits are exceeded, YALG returns `429 Too Many Requests`. Use the `Retry-After` header when present before retrying.

```json theme={null}
{
  "statusCode": 429,
  "message": "Rate limit exceeded",
  "error": "Too Many Requests"
}
```

## Retry guidance

* Retry `429` responses after `Retry-After`.
* Use exponential backoff for transient `5xx` responses.
* Do not retry validation errors until the payload is fixed.
* Avoid high-frequency polling when job status can be checked at a slower cadence.
