AI Gateway
A proxy layer that sits between your application and one or more LLM providers, handling authentication, rate limiting, load balancing, fallback routing, cost tracking, and logging. AI gateways enable organizations to switch between LLM providers without changing application code, enforce usage policies, and maintain observability across all AI interactions. Examples include Portkey, LiteLLM, and cloud-provider offerings from AWS and Azure.
Example
Your support agent normally uses Claude for inference. When Anthropic's API returns a rate limit error, the AI gateway automatically falls back to GPT-4o—maintaining uptime without any code changes or manual intervention.
Frequently asked questions
- Is an AI gateway different from an API gateway?
- An AI gateway is specialized for LLM traffic. It understands tokens, model-specific rate limits, prompt/completion semantics, and cost per model. A general API gateway handles HTTP routing but lacks LLM-aware features like token budgeting, model fallback, and prompt logging.