> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.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.

![Rate limit error](https://mintcdn.com/agno-v2/yeT29TzCG5roT0hQ/images/tpm_issues.png?fit=max\&auto=format\&n=yeT29TzCG5roT0hQ\&q=85\&s=6c4a68b6662597c61b761f782dbe5f65)

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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.