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

# Rate limits

> Per-model requests-per-minute (RPM) and tokens-per-minute (TPM) limits across Tinfoil usage tiers.

API usage is limited per model in **requests per minute (RPM)** and **tokens per minute (TPM)** across fixed one-minute UTC windows. Limits apply per account (personal account or organization) across all API keys belonging to that account.

Rate limits below are loaded live from the Tinfoil API (`api.tinfoil.sh`) and match the **Limits** page in the [Tinfoil dashboard](https://dash.tinfoil.sh).

## Usage tiers

Every account starts on **Tier 1**. Your account moves up automatically when your lifetime paid total for API usage invoices and credit purchases reaches each tier threshold. Promotional, activation, and admin-granted credits do not count toward this total.

To see your current tier, progress toward the next tier, and live per-minute usage, open **Limits** in the [Tinfoil dashboard](https://dash.tinfoil.sh) under **Usage & billing**.

> [!NOTE]
>
> Need higher or custom rate limits? [Contact us](mailto:contact@tinfoil.sh) to discuss your requirements.

## Limits by model

* **RPM** limits the number of requests per minute to a model.
* **TPM** limits uncached input tokens plus output tokens per minute. Cached prompt tokens from [prompt caching](https://docs.tinfoil.sh/sdk/prompt-caching.md) do not count toward TPM.
* Models without a TPM limit (`—`) are metered per request only.
* Built-in tools such as web search and document processing, as well as the privacy filter, are not subject to per-model RPM or TPM limits.

## When you reach a limit

When a request exceeds a model's RPM or TPM limit, the API returns HTTP `429 Too Many Requests` with a `Retry-After` header indicating how many seconds to wait until the next minute window:

```http theme={"dark"}
HTTP/1.1 429 Too Many Requests
Retry-After: 37

{
  "error": {
    "message": "Rate limit reached for requests. Retry after 37 seconds.",
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded"
  }
}
```

When a token limit is exceeded, the error message reads `"Rate limit reached for tokens. Retry after <N> seconds."`. Requests rejected by rate limiting before reaching a model are not billed.

Wait for the `Retry-After` interval and retry with exponential backoff. The Python and JavaScript [Tinfoil SDKs](https://docs.tinfoil.sh/sdk/overview.md) retry `429` responses automatically by default.

> [!NOTE]
>
> Per-key spend and token caps also return HTTP `429`, with `code` set to `insufficient_quota`. Those limits are not transient; see [Quota errors](https://docs.tinfoil.sh/sdk/error-handling.md#quota-errors) for details.


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