> For the complete documentation index, see [llms.txt](https://docs.tokenbot.com/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tokenbot.com/home/api-docs/rate-limits.md).

# Rate Limits

The TokenBot REST API rate-limits requests to ensure fair usage and platform stability.

## Default Limits

Limits are applied per minute, keyed by API key when authenticated, or by IP otherwise:

| Caller                        | Limit                       |
| ----------------------------- | --------------------------- |
| Authenticated (valid API key) | 100 requests / minute       |
| Unauthenticated               | 20 requests / minute per IP |

Health-check endpoints (`/health`, `/v1/health`) are excluded from rate limiting.

## Rate Limit Headers

Every response includes standard rate-limit headers:

```
x-ratelimit-limit: 100
x-ratelimit-remaining: 84
x-ratelimit-reset: 42
```

## Rate Limit Exceeded

When you exceed the limit you get HTTP `429`:

```json
{
  "statusCode": 429,
  "code": "RATE_LIMITED",
  "message": "Rate limit exceeded. Please slow down.",
  "details": { "limit": 100, "remaining": 0, "resetMs": 42000 }
}
```

## Best Practices

1. **Authenticate** — even read traffic gets a much higher limit with a valid key.
2. **Use webhooks** for real-time updates instead of polling.
3. **Cache responses** when possible.
4. **Implement exponential backoff** for retries.

## Increasing Your Limits

Contact us at <support@tokenbot.com> to discuss higher rate limits.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tokenbot.com/home/api-docs/rate-limits.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
