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

# Rate limits

> Per-IP rate limiting and subscription tier quotas.

# Rate limits

X1-BaaS enforces two layers of rate limiting: a **per-IP sliding window** on every
request, plus **subscription tier quotas** for API-key users.

## Per-IP rate limit

Every request (authenticated or not) is subject to a per-IP sliding-window limit of
**30 requests per minute** by default.

When exceeded, the API returns `429` with:

```json theme={null}
{
  "detail": {
    "error": "rate_limited",
    "message": "Rate limit: 30 requests per minute"
  }
}
```

<Note>
  The limit is configurable server-side via the `BAAAS_RATE_LIMIT` environment
  variable. It applies per source IP, so multiple keys behind one IP share the budget.
</Note>

## Subscription tiers

API-key users are also subject to monthly request quotas and per-tier burst limits:

| Tier         | Monthly requests | Burst (RPM) | Max concurrent |
| ------------ | ---------------- | ----------- | -------------- |
| **Free**     | 100              | 5           | 1              |
| **Starter**  | 10,000           | 30          | —              |
| **Pro**      | 100,000          | 60          | —              |
| **Business** | 1,000,000        | 120         | —              |

## x402 pay-per-use

x402 requests have **no monthly quota** — you pay `$0.005 USDC` per successful
scrape. They remain subject to the 30 RPM per-IP sliding window.

| Path               | Per-minute             | Daily/monthly        |
| ------------------ | ---------------------- | -------------------- |
| Free tier          | 30 RPM (shared per-IP) | 100 requests / month |
| Pay-per-use (x402) | 30 RPM (shared per-IP) | Unlimited            |

## Response headers

Use the `X-Request-ID` header to correlate rate-limited requests in your logs.

## Best practices

<Check> **Batch strategically.** Crawl jobs fetch with configurable `delay_ms` and `parallel` — keep them within your tier's RPM.</Check>
<Check> **Respect `robots.txt`.** Crawl mode honors it by default and applies `Crawl-delay`.</Check>
<Check> **Handle `429` gracefully.** Back off exponentially and retry rather than hammering.</Check>
<Check> **Use the response cache.** Identical URLs within 5 minutes are served from cache (pass `bypass_cache: true` to force a fresh fetch).</Check>
