---
title: Rate limits
description: Per-credential and per-IP request limits, and how to handle 429 responses.
url: https://developers.wpengine.com/docs/ai/api/rate-limits/
image: https://developers.wpengine.com/og/docs/ai/api/rate-limits.png
---

# Rate limits

The edge load balancer enforces rate limits before a request reaches the API. When you exceed a limit, you get HTTP `429`.

## Review the current limits (AI beta)

| Bucket                                               | Limit          |
| ---------------------------------------------------- | -------------- |
| Per `Authorization` value (any auth)                 | 600 req / 60 s |
| Per Internet Protocol (IP) address (unauthenticated) | 60 req / 60 s  |

These limits apply across the entire `/v1/*` surface, **not per endpoint**.

## Detect a 429 response

The load balancer generates the `429` response body as a short HTML page, not the standard JSON error envelope. The response has no `Retry-After` header:

```http
HTTP/2 429
content-type: text/html; charset=UTF-8


<!doctype html>…<title>429</title>429 Too Many Requests
```

A `429` can also come from the model provider when it’s busy. That response uses the [standard error envelope](https://developers.wpengine.com/docs/ai/api/errors/#handle-model-provider-errors) with `"type": "rate_limit_error"`. It means the model is busy, not that you hit your limit. Handle it the same way.

> **Caution**
>
> Do **not** parse the body. Rely on the status code alone to detect throttling.

## Configure client retries

1. **Catch `429` responses explicitly.**
2. **Back off exponentially with jitter.** For example, start at 1 s, double the delay on each retry up to a 30 s ceiling, and add 0–500 ms of jitter.
3. **Cap total retries** at a number that matches your service-level objective (SLO), typically 3 to 5 attempts.
4. **Don’t retry** on `400`, `401`, `402`, `403`, `404`, or `413`. These responses don’t succeed on a second attempt. The exception is a `403` with `"type": "billing_account_pending"`, which clears once the account’s billing setup finishes.

## Plan for streaming and long requests

A streaming chat completion counts as a single request against the rate limit, regardless of its duration. If you exceed the limit while a stream is in progress, the in-flight stream completes. The load balancer throttles only the next request.

The gateway also applies a server-side timeout to each call to the model provider, currently 110 seconds. It retries a call that times out up to three more times. If every attempt times out, the gateway returns `504` with `"type": "timeout_error"`, not `429`. For a streaming request, the timeout covers the wait for the stream to start, not its full duration.

---

> #### Stay inside the budget
>
> - [Errors — the response envelope shared by every failure](https://developers.wpengine.com/docs/ai/api/errors/)
> - [Stream a chat completion — long requests count once](https://developers.wpengine.com/docs/ai/api/stream-chat-completions/)
> - [Getting started — make your first call](https://developers.wpengine.com/docs/ai/api/getting-started/)

## Was this helpful?

Thanks for the feedback!

```json
{"@context":"https://schema.org","@graph":[{"@type":"WebSite","@id":"https://developers.wpengine.com/#website","name":"WP Engine Product Documentation","url":"https://developers.wpengine.com/","description":"Resources for developing, deploying, and scaling on WP Engine.","inLanguage":"en-US","keywords":["API documentation","product documentation","headless WordPress","managed WordPress hosting"],"publisher":{"@id":"https://wpengine.com/#organization"}}]}
```
