AI model API gateway

has a clear lead for rate limiting and caching LLM API requests to control costs and improve performance.

It depends

For internal LLM APIs needing an open-source gateway, is the usual answer.

Updated Nov 28, 2026ChatGPT and Google AI Mode

Brands AI mentions

#BrandMention rate
Mention rate, on ChatGPT and Google AI Mode

Pages AI cites most for this topic

Third-party sites shaping AI recommendations here

  1. 16%

Questions and answers

  • Google AI ModeNov 19, 2026

    1. 1Kong AI Gateway
    2. 2Azure API Management
    3. 3Envoy Gateway
    4. 4Langfuse
    5. 5Cloudflare AI Gateway
    6. 6Portkey AI

    Securing a public-facing model API (especially for LLMs or ML endpoints) requires more than traditional IP- or request-count-based controls. Because compute and cost scale with tokens rather than just HTTP hits, the "best" choice depends on your current tech stack and whether you are serving standard microservices or AI models.

    Top API Gateway Contenders

    1. Kong AI Gateway
      • Best for: Organizations already familiar with or running Kong for general API management.
      • Authentication: API keys, JWT, mTLS, and OIDC integrations.
      • Rate Limiting: Supports standard request-rate limits plus AI-specific policies like token-based rate limiting.
      • Pros: Mature ecosystem, robust plugin library, handles mixed traffic (traditional REST/gRPC + AI models seamlessly).
      • Cons: Advanced AI model policies can require specific licensing tiers.
    2. Azure API Management (APMI) / AI Gateway
      • Best for: Teams deeply embedded in the Microsoft Azure / Azure AI Foundry ecosystem.
      • Authentication: Native Azure Active Directory (Entra ID), OAuth via credential manager, and API keys.
      • Rate Limiting: Built-in token limits and quota management.
      • Pros: Deep enterprise integration, semantic caching, and out-of-the-box policy enforcement.
      • Cons: Feature availability varies heavily by tier.
    3. Envoy Gateway
      • Best for: Kubernetes-native environments and high-performance cloud-native stacks.
      • Authentication: JWT, OAuth2, and external authorization services via SecurityPolicy extensions.
      • Rate Limiting: Global and local rate limiting (can be extended or coupled with token-aware logic).
      • Pros: Ultra-low latency, open-source core, massive scalability in K8s clusters.
      • Cons: Steeper configuration learning curve compared to managed gateways.
    4. Dedicated AI-Native Gateways (e.g., Portkey, Langfuse, or Cloudflare AI Gateway)
      • Best for: Lightweight proxy needs focused heavily on LLM observability, caching, fallback routing, and per-user token quotas.
      • Authentication: Custom token management, BYO-key, or JWT verification.
      • Rate Limiting: Native per-user/per-organization token bucket and cost-budget limits.
      • Pros: Drop-in setup for LLM providers (OpenAI, Anthropic, Bedrock), built-in prompt analytics, and cost tracking.
      • Cons: Less suited if your endpoint is a custom PyTorch/Triton/ONNX model served via raw REST/gRPC rather than an LLM.

    Key Requirements for Model APIs

    When evaluating your choice, prioritize these features over standard web gateway features:

    • Token-Aware Rate Limiting: Traditional HTTP request limits will let a single malicious or buggy client drain your LLM/GPU budget via massive context-window prompts. Ensure the gateway can inspect or estimate token counts.
    • Authentication at the Edge: Validate JWTs, OAuth2, or HMAC signatures before requests ever hit your model serving infrastructure.
    • Timeouts and Streaming Support: If your model uses Server-Sent Events (SSE) for token streaming, verify that the gateway doesn't buffer chunks or prematurely kill long-lived connections.

    To help narrow down the ideal fit, tell me:

    • Is your model a traditional ML/Deep Learning endpoint (Triton, PyTorch, custom container) or a Large Language Model / Generative API?
    • Where is it hosted (e.g., AWS, Azure, GCP, Kubernetes, or bare metal)?
    • Do you need token-based cost tracking or just basic request-rate throttling?

    ChatGPTNov 19, 2026

    1. 1Kong Gateway
    2. 2AWS
    3. 3Amazon API Gateway
    4. 4Cloudflare
    5. 5Cloudflare API Shield
    6. 6NVIDIA Triton Inference Server

    For a public-facing model API, I recommend putting an API gateway in front of your model-serving infrastructure rather than implementing authentication and rate limiting directly in the model server.

    The right choice depends on whether you're running in the cloud, Kubernetes, or on your own infrastructure.

    For an AI/LLM API, the gateway should handle more than basic request throttling. Ideally, it should support API-key authentication, per-customer quotas, burst limits, request-size limits, and usage tracking.

    API gateways worth considering

    1. Kong Gateway — Best general-purpose choice

    (My recommendation)

    • API-key authentication and consumer management.
    • Per-consumer and per-route rate limiting.
    • Redis-backed distributed rate limiting.
    • Advanced rate-limit algorithms and traffic controls.
    • Self-hosted or managed deployment options.

    Particularly suitable if you want control over your infrastructure and expect multiple model API customers.

    Sources:

    Kong Gateway website ·


    • AWS SAMでLambda関数を作成する際のポリシーの書き方について | DevelopersIO

    2. Amazon API Gateway — Best for AWS-native infrastructure

    • Fully managed gateway.
    • Usage plans, API keys, quotas and throttling.
    • Integration with IAM, Cognito and Lambda authorizers.
    • Convenient if your model endpoint runs on AWS.

    Important: AWS explicitly warns that API keys and usage-plan quotas aren't sufficient as authentication or hard cost-control mechanisms.

    Sources:

    AWS API Gateway ·


    • Why Cloudflare’s Outage Should Terrify AI-First Startups | by Abhinav | Medium

    3. Cloudflare API Shield — Best for edge protection

    • JWT validation.
    • Rate-limiting rules.
    • API schema validation.
    • Protection close to the public-facing endpoint.

    Particularly useful when you want to protect an API before traffic reaches your infrastructure. Note that its JWT validation feature requires the Enterprise API Shield add-on.

    Sources:

    Cloudflare API Shield ·

    My recommended architecture for a model API

    For a public-facing LLM inference endpoint, I'd use this structure:

    Public API clients

    Applications, developers, customer integrations

    Cloudflare / WAF

    DDoS protection, edge filtering, IP restrictions

    Kong API Gateway

    Authentication, quotas, rate limiting, request validation

    Model-serving API

    vLLM, TGI, Triton, or custom inference server

    GPU inference infrastructure

    Security controls I'd implement

    ControlSuggested implementation
    AuthenticationAPI keys or OAuth2/JWT
    Per-customer limitsConsumer-based rate limits
    Burst protectionToken bucket / sliding window
    IP protectionWAF and IP-based limits
    Request sizeMaximum body and input token limits
    Cost protectionPer-customer token and spending quotas
    MonitoringRequest logs, usage metrics and alerts
    Network securityKeep inference servers private; only expose the gateway

    One particularly important consideration for LLM APIs: Request-based rate limiting alone isn't enough. A customer making 10 requests with 100,000 input tokens each can consume significantly more GPU resources than someone making 100 short requests.

    Use gateway-level request limits alongside application-level input/output token accounting and hard spending limits.

    Final recommendation

    I'd choose based on your deployment:

    • Kong Gateway: If you want a flexible, self-hosted gateway with strong API management.
    • AWS API Gateway: If you're already using AWS and prefer minimal infrastructure operations.
    • Cloudflare + Kong: If you want both edge-level protection and detailed per-customer API controls.

    For Kong, I'd start with:

    1. Key Auth or JWT authentication.
    2. Consumer-based rate limiting.
    3. Redis-backed shared counters if running multiple gateway instances.
    4. Request-size and input-token limits.
    5. Application-level token accounting and customer spending quotas.

    See Kong's implementation guide.

    One question to narrow it down

    Where is your model API currently deployed?

    1. Deployment environment

    Kubernetes / self-hosted

    AWS

    Google Cloud

    Azure

    Bare-metal GPU servers


    2. Preferred authentication

    API keys for customers

    OAuth2 / JWT

    Both


    3. Expected usage

    Development / internal use

    Production / multiple customers

    High-volume public API

    [Get my recommended architecture]

  • Google AI ModeNov 10, 2026

    1. 1Kong
    2. 2OpenAI
    3. 3Anthropic
    4. 4Okta
    5. 5Microsoft
    6. 6AWS
    7. 7Microsoft Azure
    8. 8Amazon Bedrock
    9. 9Google Cloud Platform

    Public-facing AI and model endpoints require specialized handling because traditional request-count rate limiting isn’t enough—you need to account for token consumption (prompt vs. completion), latency , and model-specific auth (such as virtual keys or usage budgets).

    The top API gateway options span general-purpose cloud gateways, open-source AI gateways, and enterprise-grade platforms.

    1. Top API Gateway & AI Gateway Options

    2. Key Capabilities for Model Endpoints

    When exposing public-facing model endpoints, look for these specific features that go beyond standard HTTP reverse-proxy logic:

    • Token-Aware Rate Limiting: Standard gateways count HTTP requests. Model gateways (like Kong’s AI Rate Limiting or Azure’s token-limit policy) count Tokens-Per-Minute (TPM) or Prompt/Completion breakdowns to prevent a single user from draining your budget or saturating GPU clusters.
    • Virtual Key Management: Issuing proxy/virtual keys to external clients lets you enforce spending caps (e.g., "$10 max limit per client key") without exposing your root OpenAI/Anthropic/Bedrock API keys.
    • Authentication & Federation: Integration with standard identity providers via OIDC / OAuth2 (Okta, Microsoft Entra ID) or mTLS for service-to-service calls.
    • Guardrails & PII Redaction: On-the-fly request/response inspection to strip Personally Identifiable Information (PII) or block jailbreak prompts before they reach the model.
    • Fallback & Circuit Breaking: Automatic rerouting to a secondary model or provider if the primary LLM endpoint throws rate-limit errors (429) or latency spikes.

    To see a technical breakdown of how these components work under the hood, you can watch this visual overview:

    Watch this deep dive into how API gateways handle request routing, authentication, and rate limiting in production systems:

    19:46API Gateway Deep Dive: Routing, Auth, Rate Limiting, CachingYouTube · Shubh Patel · ...7.4K views · 3 months ago

    Are you building this on a specific cloud provider (like AWS, Azure, or GCP) or looking for a self-hosted open-source stack ? Let me know your rough traffic scale and I can narrow down the best fit.

    ChatGPTNov 10, 2026

    1. 1Google Cloud API Gateway
    2. 2Azure API Management
    3. 3Kong
    4. 4Tyk
    5. 5Cloudflare API Shield
    6. 6Kong Gateway
    7. 7Amazon API Gateway
    8. 8Gravitee.io
    9. 9Google Cloud Apigee
    10. 10NVIDIA Triton Inference Server

    For public-facing model endpoints (LLM inference APIs, embedding services, and hosted ML models), I would prioritize an API gateway that provides strong authentication, per-consumer rate limiting, quota enforcement, and protection against abuse.

    The strongest options fall into three groups:

    1. Managed API gateways: AWS API Gateway, Google Cloud API Gateway, Azure API Management.
    2. API infrastructure gateways: Kong, Tyk, Gravitee.
    3. Edge and application security platforms: Cloudflare API Shield/API Gateway, Apigee.

    One important distinction: protecting an endpoint requires more than API-key validation. For model APIs, you also want token-based usage limits, request-size controls, concurrency limits, and protection against expensive inference abuse.

    1. API gateway comparison

    PlatformAuthenticationRate limiting and quotasBest fit
    Kong GatewayOAuth2, OIDC, JWT, API keys, mTLSPer-consumer, per-route, Redis-backed distributed limits; specialized AI rate limitingFlexible model-serving infrastructure
    Google ApigeeOAuth2, API keys, access tokensSpike arrest, quotas, LLM token quotasEnterprise API products
    Azure API ManagementJWT validation, OAuth2, Entra ID, subscription keysPer-key limits, quotas, concurrency and LLM token limitsAzure and enterprise deployments
    AWS API GatewayIAM, Cognito, JWT, Lambda authorizersRequest throttling, per-client usage plans and quotasAWS-native deployments
    Cloudflare API ShieldJWT validation, mTLSRate limiting, schema validation, abuse detectionPublic internet-facing endpoints
    Google Cloud API GatewayJWT and Google authenticationAPI quotasLightweight GCP deployments

    Strongest candidates

    1. Kong Gateway — best overall flexibility

    (My top pick for flexible AI infrastructure)

    • Supports authentication plugins that validate clients before requests reach model-serving infrastructure.
    • Supports per-consumer and per-route rate limits.
    • Redis-backed rate limiting helps maintain shared limits across gateway instances.
    • Has specialized AI rate-limiting capabilities.

    Particularly interesting for LLM deployments is its AI-specific rate-limiting functionality.

    Documentation:

    2. Google Apigee — best for enterprise API monetization and governance

    • OAuth2 and API-key-based client management.
    • Distributed quotas and traffic spike protection.
    • Dedicated LLMTokenQuota and PromptTokenLimit policies.
    • Useful analytics and developer-facing API management.

    Its token-aware policies are especially valuable when inference costs vary significantly by prompt and completion size.

    Documentation:

    3. Azure API Management — best for sophisticated usage policies

    • JWT validation and integration with Microsoft Entra ID.
    • Per-key rate limiting and renewable quotas.
    • Concurrency controls.
    • Dedicated LLM token usage limiting policy.

    This is a particularly strong candidate if you need different usage tiers for customers, organizations, and API products.

    Documentation:

    4. AWS API Gateway — best for AWS-native simplicity

    • JWT authorizers for HTTP APIs.
    • Cognito and IAM integration.
    • Usage plans with API keys, quotas and throttling.
    • Integration with AWS WAF.

    An important caveat: AWS explicitly describes usage-plan throttling and quotas as best-effort targets, not hard enforcement. Don't rely on them alone for inference cost protection.

    Documentation:

    5. Cloudflare API Shield — best for edge security

    • JWT validation.
    • Mutual TLS authentication.
    • API schema validation.
    • API abuse detection and rate limiting.

    It is particularly useful as an outer security layer before traffic reaches your inference gateway.

    Documentation:

    -

    2. What matters specifically for model endpoints

    Traditional API gateways usually count requests. That is insufficient for model-serving workloads.

    Consider these five enforcement layers:

    ControlExampleWhy it matters
    AuthenticationOAuth2, JWT, API keysPrevent unauthorized inference
    Request rate30 requests/minutePrevent request floods
    Token budget100K tokens/dayControl inference expenditure
    Concurrency5 simultaneous generationsProtect GPU capacity
    Payload limitsMaximum prompt sizePrevent oversized requests

    I would also implement:

    • Tenant isolation: Separate quotas and usage accounting for each customer.
    • Model-specific policies: Different limits for expensive models and lightweight models.
    • Streaming protection: Limit generation duration and concurrent streaming connections.
    • Cost enforcement: Stop requests when an account reaches its spending allowance.
    • Audit logging: Track customer, model, token consumption, latency and status.

    Apigee and Azure have particularly interesting native LLM token controls. Kong is also compelling for teams that want to customize their AI gateway infrastructure.

    3. Recommended architecture

    For a production public-facing model API, I'd use this architecture:

    Public clients

    Applications, SDKs, customer integrations

    Edge security / WAF

    DDoS protection, bot filtering, IP controls

    API gateway

    JWT validation, API keys, authentication, request throttling

    Usage and policy enforcement

    Tenant quotas, token budgets, concurrency, model permissions

    Model router

    Routing and fallback

    Usage metering

    Actual token accounting

    Model-serving infrastructure

    vLLM, Triton, hosted LLMs, GPU inference clusters

    One architectural detail: enforce estimated token budgets before inference, then reconcile against actual prompt and completion tokens afterward. This avoids relying on request-count throttling to control model expenditure.

    4. My recommendation

    I'd shortlist these three:

    PriorityPlatformReason
    1KongFlexible, extensible, AI-focused controls
    2ApigeeStrong native LLM token quotas
    3Azure APIMStrong enterprise identity and usage policies

    For a high-volume model API, I would lean toward Kong with Redis-backed distributed rate limiting and a separate usage-metering service. For a managed enterprise platform, I'd evaluate Apigee first.

    5. A question that would narrow the choice

    What kind of public-facing model endpoints are you building?

    Deployment environment

    Self-hosted models (vLLM, TGI, Triton)

    Managed cloud models (OpenAI, Bedrock, Vertex AI)

    Hybrid model-serving architecture


    Most important requirement

    Per-customer token quotas and cost controls

    Strong authentication and tenant isolation

    High throughput and GPU concurrency protection

    All of the above


    Expected deployment scale

    Prototype / early-stage API

    Production, moderate traffic

    High-volume, multi-tenant production

    [Get a tailored architecture recommendation]

  • Google AI ModeNov 28, 2026

    1. 1Kong AI Gateway
    2. 2Apache APISIX
    3. 3LiteLLM
    4. 4Cloudflare AI Gateway
    5. 5Portkey AI

    When exposing public AI model endpoints, you need a gateway that goes beyond traditional HTTP rate-limiting and auth—it must understand things like [Highlight start] token usage, model-specific throttling, fallback routing, and streaming responses (SSE) [Highlight end].

    The top options span traditional infrastructure gateways adapted for AI, specialized LLM/AI gateways, and cloud-native solutions:

    1. Traditional API Gateways (AI-Enhanced)

    • Kong AI Gateway
      • Best for: High-throughput, low-latency enterprise production where you already use Kong for standard REST/GraphQL traffic.
      • Strengths: Built on NGINX/OpenResty, Kong offers native AI plugins (AI Proxy, AI Auth, AI Rate Limiting) that track token consumption rather than just raw requests. Independent benchmarks show it significantly outperforms Python- or Node-based proxy wrappers in raw latency.
    • Apache APISIX
      • Best for: Open-source, cloud-native Kubernetes environments needing dynamic routing and custom plugins.
      • Strengths: Powered by etcd and Lua/OpenResty, APISIX supports high-performance traffic management, fine-grained consumer key authentication, and custom rate-limiting policies per model or tenant.

    2. Specialized AI & LLM Gateways

    • LiteLLM (Proxy Server)
      • Best for: Rapid deployment, multi-model translation (OpenAI-format to Anthropic, Bedrock, vLLM, etc.), and Python-centric or startup-to-scale-up teams.
      • Strengths: Provides a drop-in OpenAI-compatible proxy server with built-in virtual keys, spend tracking, per-key/per-model rate limits, and team-based budgets out of the box.
    • Portkey
      • Best for: Observability, semantic caching, automated fallbacks, and fine-grained access control.
      • Strengths: Offers a robust open-source and managed control plane with virtual keys, real-time logging, guardrails, and detailed rate-limiting policies tailored for LLM workloads.
    • Bifrost
      • Best for: Enterprises requiring ultra-low-latency, air-gapped, or on-premise governance across unified LLM, agent, and MCP gateways.
      • Strengths: Designed for minimal overhead (very low latency per request) with strict enterprise policy enforcement and multi-environment routing.

    3. Cloud-Native & Hyperscaler Gateways

    • Cloudflare AI Gateway
      • Best for: Teams already running on Cloudflare Workers who want zero-maintenance analytics, caching, and basic rate limiting.
      • Strengths: Super easy to toggle on in front of providers like OpenAI, Anthropic, or Workers AI, though restricted by Cloudflare's network topology and privacy posture.
    • Azure AI Gateway (Azure API Management)
      • Best for: Organizations locked into the Microsoft/Azure ecosystem using Azure AI Foundry.
      • Strengths: Native policy enforcement, token-aware throttling, and enterprise-grade identity integration via Entra ID.

    Quick Comparison Matrix

    GatewayTypeKey StrengthRate Limiting Granularity
    Kong AI GatewayTraditional / InfrastructureExtreme speed & scalePer-token, per-consumer, per-model
    LiteLLM ProxySpecialized LLM GatewayOpenAI-format translation & budgetsPer-virtual-key, spend limits, RPM/TPM
    PortkeySpecialized AI GatewayObservability, caching & guardrailsPer-key, semantic caching, fallbacks
    Cloudflare AI GatewayCloud-native EdgeZero-config setup & analyticsRequest/cache/cost controls

    To help narrow down the best fit, tell me:

    • Are you self-hosting your own models (e.g., via vLLM, TGI, or Ollama ) or proxying third-party APIs (OpenAI, Anthropic)?
    • Do you need rate limiting based on raw requests (RPM), tokens per minute (TPM) , or dollar spend limits?

    ChatGPTNov 28, 2026

    1. 1Apache APISIX
    2. 2Amazon API Gateway
    3. 3Envoy Gateway
    4. 4Envoy Proxy
    5. 5Kong Gateway
    6. 6Cloudflare Polish
    7. 7Google Cloud Apigee

    For public AI model endpoints, I’d look for an API gateway that provides more than traditional API authentication and rate limiting. AI inference endpoints have additional requirements: expensive requests, variable token consumption, burst traffic, API key abuse, and potentially large payloads.

    I would compare gateways across five capabilities:

    1. Authentication: API keys, OAuth 2.0/OIDC, JWT validation, and service-to-service identity.
    2. Rate limiting: Per-user, per-API-key, per-IP, and per-model limits.
    3. AI-aware quotas: Token-based limits, request budgets, and usage tracking.
    4. Security: WAF integration, request-size limits, IP restrictions, and abuse protection.
    5. Observability: Per-customer usage, latency, error rates, and cost attribution.

    Top API gateway options

    1. Kong AI Gateway

    (Strong all-around option)

    • API key and consumer authentication.
    • OAuth and other authentication strategies.
    • Per-consumer and advanced rate limiting.
    • AI token consumption controls and cost tracking.
    • Multi-provider routing, retries, and observability.

    Best for: Production AI APIs with multiple customers, models, or providers.

    Documentation: Kong AI Gateway ·


    • Why Cloudflare’s Outage Should Terrify AI-First Startups | by Abhinav | Medium

    2. Cloudflare AI Gateway

    (Strong managed option)

    • Gateway authentication.
    • Configurable fixed-window and sliding-window rate limits.
    • Logging, caching, and analytics.
    • Unified API for OpenAI, Anthropic, Google, and other providers.
    • Cloudflare edge infrastructure.

    Best for: Teams wanting a managed service without operating gateway infrastructure.

    One consideration: its documented rate limiting is request-based, so implement additional token-budget enforcement if you need per-customer inference cost controls.

    Documentation: REST API · Rate limiting ·


    • Index of /res/apisix

    3. Apache APISIX

    (Strong open-source option)

    • API key and other authentication plugins.
    • Consumer-based rate limiting.
    • AI proxy and multi-provider routing.
    • Token-based rate limiting.
    • Extensible plugin architecture.

    Best for: Self-hosted infrastructure, Kubernetes deployments, and teams wanting control over gateway behavior.

    Particularly interesting because its AI rate-limiting plugin supports token-based consumption limits.

    Documentation: APISIX AI Gateway ·


    • Search: aws glue Logo PNG Vectors Free Download

    4. Amazon API Gateway

    • API keys and usage plans.
    • Per-client throttling and quotas.
    • IAM, Lambda authorizers, and JWT authorization through supported configurations.
    • AWS WAF integration.
    • Integration with Lambda, ECS, and other AWS services.

    Best for: AI endpoints already hosted in AWS.

    Important distinction: its standard usage plans meter requests, not actual LLM token consumption. You may need a separate quota service.


    • GitHub - envoyproxy/envoy: Cloud-native high-performance edge/middle/service proxy · GitHub

    5. Envoy Gateway / Envoy Proxy

    • JWT authentication.
    • External authorization integrations.
    • Local and global rate limiting.
    • Kubernetes Gateway API integration.
    • Flexible traffic management.

    Best for: Platform engineering teams that want a programmable, Kubernetes-native gateway.

    Consider this when you already operate Envoy infrastructure and are comfortable assembling the AI-specific controls yourself.


    • Introducing the Apigee Migration Assessment Tool: Your roadmap to a smooth transition | Tilo Dickopp

    6. Google Apigee

    • OAuth 2.0 and API key verification.
    • Spike arrest and quota policies.
    • API products and developer access management.
    • Analytics and enterprise governance.

    Best for: Enterprise API programs where AI endpoints are part of a broader API product portfolio.

    You may need custom policies or backend metering for token-based AI quotas.

    Feature comparison

    GatewayAPI authenticationRequest limitsToken-based limitsDeployment
    KongExcellentYesYesSelf-hosted / managed
    CloudflareYesYesAdditional controls neededManaged
    APISIXExcellentYesYesSelf-hosted
    AWS API GatewayExcellentYesCustom implementationManaged
    Envoy GatewayYesYesCustom implementationSelf-hosted
    ApigeeExcellentYesYesManaged / hybrid

    One particularly interesting alternative is Apigee: its LLMTokenQuota and PromptTokenLimit policies explicitly support token-based usage controls.

    AWS has an important caveat: usage-plan quotas and throttles are best-effort, not guaranteed hard ceilings. AWS explicitly advises against relying on them alone for cost control.

    My recommendation

    For public AI model endpoints, I'd narrow the shortlist to:

    • Kong: If you want a dedicated AI gateway with authentication, token metering, and multi-model routing.
    • Cloudflare: If you want minimal infrastructure management and edge protection.
    • APISIX: If you want open-source control and token-aware rate limiting.
    • Apigee: If enterprise API governance and token quotas are priorities.

    Recommended architecture

    Regardless of gateway, I'd use this request flow:

    Public API clients

    Developer applications / SDKs

    API Gateway

    Authentication · WAF · IP throttling

    Usage & quota enforcement

    Per-customer limits · Token budgets · Model entitlements

    AI inference service

    Model routing · GPU inference · Streaming

    A particularly important design decision: don't rely exclusively on request-count rate limiting. One customer making 10 requests could consume more GPU resources than another customer making 1,000 requests.

    I'd implement:

    • Requests per second per API key.
    • Concurrent inference limits per customer.
    • Input and output token budgets.
    • Maximum context and generation lengths.
    • Monthly customer spending limits.
    • Global GPU capacity protection.

    A few questions to narrow down the best choice

    The right gateway depends quite a bit on your infrastructure and business model.

    1. Where are your models hosted?

    • Kubernetes / self-hosted GPUs
    • AWS
    • GCP / Azure
    • Multiple cloud providers

    2. What authentication model do you need?

    • API keys issued to customers
    • OAuth2 / JWT
    • Both

    3. What's your deployment preference?

    • Open source / self-hosted
    • Fully managed SaaS
    • Either

    4. Do you need token-based billing and quotas?

    • Yes, per-customer token budgets
    • Yes, usage-based billing
    • Just request-based rate limiting

    With those answers, I can narrow this down to the best two or three gateways and suggest a concrete production architecture.

  • We want to implement rate limiting and caching for our internal LLM API. What's the best open-source API gateway for this?

    Summary

    LiteLLM is the usual answer for an open-source gateway handling rate limits and caching on an internal LLM API. The answers also point to its self-hosted flexibility, budget controls, and caching features.

Since Jul 5Data through Nov 28, 2026Based on 80 AI answers

How we measure
For agents: this page as Markdown, parse.gl/topics/llm-rate-limiting-and-caching.md. JSON, MCP · free for the last 90 days, checks from $0.01

This page

As Markdown: parse.gl/topics/llm-rate-limiting-and-caching.md
Reuse: Figures and tables on this page are free to republish with attribution: a link to https://parse.gl/topics/llm-rate-limiting-and-caching beside them. A standard followed link (dofollow) is preferred.

Read and search

Every brand's share on this topic, with 95% ranges: GET agent.parse.gl/v1/tools/query_metrics?args=%7B%22measures%22%3A%5B%22share_named%22%5D%2C%22by%22%3A%5B%22brand%22%5D%2C%22filter%22%3A%7B%22topic%22%3A%5B%22top_2213286c-3ff1-4d9e-9615-575bcd1e19e5%22%5D%7D%7D
Search the index: GET parse.gl/api/public/search?q=<words>

Connect

Connect an assistant: agent.parse.gl/mcp
CLI check: npx -y parse-gl check <domain>

An agent can save work before signup: POST https://agent.parse.gl/v1/workspaces

What it costs

No account: Public figures and up to 5 examples per list, about 120 brands a day per address.
Free account: $2 verified-email starter credits, 90-day Parse Index reads, your brand's first check (20 buyer questions), and a free weekly check.
Prepaid credits (from $20): Exports, deeper search results, live checks, verified contacts, and daily tracking ($12 a month).
Live checks: $0.01 per standard check/live page/judgment; $0.05 per frontier check (Gemini, Claude) or verified contact.
Full public answers and pages: 25 free per day, then $0.01 each.
Public answers older than 90 days: $0.01 each the first time your workspace counts or lists one, then yours.