AI Rate Limiting Advanced

AI License Required

Enable rate limiting with multiple conditionsv3.14+

Protect your LLM services with rate limiting based on multiple conditions. The AI Rate Limiting Advanced plugin will analyze query costs and token response to provide an enterprise-grade rate limiting strategy.

In this example, we’re enabling rate limiting for a specific Consumer using the OpenAI provider. The limits specified only apply when both conditions are met. Once the limit is reached, the same Consumer may be able to send requests to a different provider.

Prerequisites

Environment variables

  • CONSUMER_USERNAME: The username of the Consumer to rate limit.

Set up the plugin

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!