Unkey comes with per-key ratelimiting out of the box. Set null
to disable.
Field | Type | Required | Description |
---|---|---|---|
limit |
int | ✔️ | The total amount of requests allowed in a single window. |
type |
Optional[models.UpdateKeyType] | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. Fast ratelimiting doesn't add latency, while consistent ratelimiting is more accurate. Deprecated, use 'async' instead Learn more |
async_ |
Optional[bool] | ➖ | Asnyc ratelimiting doesn't add latency, while sync ratelimiting is slightly more accurate. Learn more |
refill_rate |
Optional[int] | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. How many tokens to refill during each refillInterval. Deprecated, use 'limit' instead. |
refill_interval |
Optional[int] | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. Determines the speed at which tokens are refilled, in milliseconds. Deprecated, use 'duration' |
duration |
Optional[int] | ➖ | The duration of each ratelimit window, in milliseconds. This field will become required in a future version. |