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

# Tokens-per-minute rate limiting

> Retry rate-limited requests by setting retries, delay_between_retries, and exponential_backoff on the agent.

<img src="https://mintcdn.com/phidatainc/JUdd69R_GtzOgSkJ/images/tpm_issues.png?fit=max&auto=format&n=JUdd69R_GtzOgSkJ&q=85&s=5a9e06342b01e85953a5edf74b6b0e39" alt="Rate limit error" width="698" height="179" data-path="images/tpm_issues.png" />

If a provider rate-limits your agent, configure retries:

```python theme={null}
from agno.agent import Agent
from agno.models.openai import OpenAIChat

agent = Agent(
    model=OpenAIChat(id="gpt-5.4-mini"),
    retries=3,
    delay_between_retries=2,
    exponential_backoff=True,
)
agent.print_response("Tell me about a breaking news story from New York.", stream=True)
```

`retries` defaults to `0`, so setting `exponential_backoff` or `delay_between_retries` alone has no effect. Set `retries` to the number of retry attempts you want.

| Parameter               | Default | Description                                |
| ----------------------- | ------- | ------------------------------------------ |
| `retries`               | `0`     | Number of retries after a failed run       |
| `delay_between_retries` | `1`     | Delay in seconds before each retry         |
| `exponential_backoff`   | `False` | Double the delay after each failed attempt |

OpenAI applies tier-based rate limits. See the [OpenAI rate limit docs](https://platform.openai.com/docs/guides/rate-limits) for the limits on your account.
