AI Rate Limiting Advanced Policy

Enable AI Consumer rate limiting

Protect your LLM services with AI Consumer rate limiting. The AI Rate Limiting Advanced Policy analyzes query costs and token responses to provide an enterprise-grade rate limiting strategy.

In this example, we’re rate limiting a specific AI Consumer using its ID. You can also target an AI Consumer using its username or custom ID by changing the config.policies.match.key value.

Prerequisites

Environment variables

  • CONSUMER_ID: The ID of the AI Consumer to rate limit.

Set up the policy

Attach the policy

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!