Detent documentation
Detent is a rate limiter as a service. Instead of running and tuning your own limiting logic, you call Detent, it returns a verdict, and your app enforces it.
The core model is one HTTP call: POST /v1/limit with a namespace, a key,
an algorithm, and a limit/window_ms. Detent responds 200 with
{ allowed, remaining, reset_ms, limit }. That’s the whole contract —
Detent never emits a 429 for you. The verdict is just data; whether to
reject, queue, or degrade a request is your app’s call, not ours.
Under the hood, every decision is made in one atomic step, so concurrent requests against the same key can’t race past your limit — there’s no window where two requests both get admitted because they were checked separately. You get a consistent count of what already happened, not an estimate.
Where to go next:
- Quickstart — make your first rate-limit decision in three steps.
- Algorithms — how each algorithm behaves and when to use it.
- API reference — the full
/v1surface.