Headers
Successful JSON responses (200) and the 429 answer carry the state of the window:
The streaming endpoint’s
text/event-stream response and the other error envelopes (401, 403, 404, 409, 422, 503, 500) do not carry these headers; only X-Request-ID is on every response. If you pace a client on X-RateLimit-Remaining, treat a missing header as “unknown”, not as zero.
When the window is exhausted the API answers 429 rate_limit_exceeded and adds Retry-After (seconds until the window resets).
When the limiter itself is down
The limiter fails closed. If its backing store is unavailable, the API answers503 api_rate_limit_unavailable with Retry-After: 5 instead of letting requests through unmetered, and instead of a misleading 429. Treat it like any other transient error: wait and retry with the same Idempotency-Key.