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

# Rate limiting

> Understand per-client request limits and how to handle them

The API enforces per-client rate limits to ensure fair usage and service stability.

## Default limits

Each client account has a default limit of **60 requests per minute**. This applies across all endpoints and is tracked by client ID, not by IP address.

Your specific limit depends on your plan tier and can be viewed in the [dashboard](https://app.omnifence.ai).

## Rate limit response

When you exceed your limit, the API returns a `429` status code:

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

## Handling rate limits

Use exponential backoff with jitter when you receive a `429` response:

```javascript theme={null}
async function requestWithBackoff(fn, maxRetries = 3) {
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    const response = await fn();
    if (response.status !== 429) return response;

    const delay = Math.min(1000 * 2 ** attempt, 30000);
    const jitter = delay * (0.5 + Math.random() * 0.5);
    await new Promise((resolve) => setTimeout(resolve, jitter));
  }
  throw new Error('Rate limit exceeded after retries');
}
```

## Best practices

* **Batch submissions** rather than sending many requests in quick succession.
* **Use webhooks** instead of polling job status repeatedly. See [webhooks](/platform/webhooks).
* **Stream progress** with [SSE](/platform/sse-progress) instead of polling the job status endpoint.
