rate_limit_exceeded
HTTP/1.1 429 Too Many RequestsRetry-After: 32x-ratelimit-limit: 600x-ratelimit-remaining: 0x-ratelimit-reset: 1715292000{ "error": { "type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Rate limit of 600 requests/minute exceeded for this API key.", "docs_url": "https://docs.patomic.dev/errors/rate-limit-exceeded", "request_id": "…", "suggestion": "Wait until the timestamp in the `Retry-After` header (or the `x-ratelimit-reset` epoch) before retrying. Increase your per-key quota by upgrading your plan or by minting an additional key." }}What it means
Section titled “What it means”This API key has issued more requests in the current minute window than its rate_limit_rpm allows.
How to fix
Section titled “How to fix”- Honour
Retry-After. It’s the seconds until the current window resets. Fixed-interval retries (every 1s, every 5s) are a footgun and may starve other callers. - Use exponential backoff with jitter for repeated 429s. Five back-to-back 429s usually mean a configuration mismatch, not transient load — investigate.
- If the limit is too low, raise it:
PATCH /v1/keys/{id}with{"rate_limit_rpm": 6000}. There’s no upsell wall — limits exist to protect Patomic, not extract revenue. - For sustained high throughput, mint multiple keys and round-robin between them. Each has its own counter.
Reference TypeScript client
Section titled “Reference TypeScript client”async function withRetry(fn: () => Promise<Response>): Promise<Response> { for (let i = 0; i < 5; i++) { const res = await fn(); if (res.status !== 429) return res; const wait = Number(res.headers.get("retry-after") ?? 1) * 1000; await new Promise((r) => setTimeout(r, wait + Math.random() * 200)); } throw new Error("rate-limited 5x — review key throughput plan");}