> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
