---
title: Rate limits & errors
description: Per-plan rate limits and the RFC 7807 error shape every endpoint returns.
order: 3
---

## Rate limits

Limits are per API key, requests per minute:

| Plan | Default `/v1/*` | `/v1/reason` |
|---|---|---|
| Free | 30 req/min | not available — see below |
| Pay As You Go | 120 req/min | 10 req/min |

`/v1/reason` requires a Pay As You Go plan — it runs a full LLM generation on top of retrieval and isn't offered on Free. Calling it on Free returns `403` with `code: plan_required`.

A small number of unauthenticated, IP-keyed routes have their own tighter limits: the `/pdf/*` proxy (30 req/min) and the public `/survey` endpoint (5 req/min).

Going over a limit returns `429` with `code: rate_limited`.

## Errors

Every error is [RFC 7807](https://www.rfc-editor.org/rfc/rfc7807) `application/problem+json`:

```json
{
  "type": "https://dike.it.com/errors/rate_limited",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "Rate limit of 30 requests/minute exceeded.",
  "code": "rate_limited"
}
```

`code` is the stable, machine-readable field — match on it, not on `title`/`detail`, which are for humans and can change wording without notice.

| Status | `code` | Meaning |
|---|---|---|
| 401 | `unauthorized` | Missing or invalid API key |
| 403 | `plan_required` | Endpoint needs a Pay As You Go plan |
| 404 | `not_found` | Resource doesn't exist (e.g. unknown `canonical_id`) |
| 404 | `citation_not_found` | `/v1/cite` parsed the citation but no document matched |
| 422 | `citation_unparseable` | `/v1/cite` couldn't parse the citation string at all |
| 422 | `validation_error` | Request body failed schema validation |
| 429 | `rate_limited` | Over the plan's rate limit |
| 503 | `upstream_unavailable` | A downstream dependency (Mongo/Qdrant/embedding/LLM) is down |

Dike never fabricates a citation to avoid returning an error — see [`/v1/reason`](/docs/api-reference/reason) for how the hallucination guard handles context it can't ground an answer in.
