Glossary gateways/

What is an AI gateway?

An AI gateway is a proxy that applications and coding agents call instead of a model provider's API, so that provider credentials, usage attribution, rate limits and request logging are handled in one place.

Published
Read
1 min
Source
Markdown

Also called: LLM gateway, model gateway

# From Anthropic's docs: point Claude Code at an organization's LLM gateway
export ANTHROPIC_BASE_URL=https://llm-gateway.example.com
export ANTHROPIC_AUTH_TOKEN=sk-gateway-key

With those two variables set, Claude Code sends model requests to the gateway with a gateway credential, and the gateway forwards them to the provider. Anthropic’s docs list what that indirection buys: the provider key stays server-side, usage is attributed per developer or team, budgets and rate limits live in one place, every model request can be logged, and the provider can change without touching developer machines. The cost is another piece of infrastructure to operate and keep current as clients add features.

No standard defines “AI gateway”, and products use the label for different scopes. In its narrow sense it governs model traffic: prompts, completions and token spend. That matches OWASP’s LLM10:2025 Unbounded Consumption guidance on rate limiting, user quotas and usage monitoring. An MCP gateway governs a different layer, tool calls; products that cover models, tools and agent-to-agent traffic often call themselves agent gateways.

A gateway that logs full prompts and completions holds sensitive data, so give those logs their own retention and access rules.

See also: MCP gateway · Agent gateway · Audit log · What an MCP gateway does

Agent gateway, Audit log, MCP gateway, Non-human identity (NHI)

Sources

  1. Connect Claude Code to an LLM gatewayAnthropic (Claude Code docs) code.claude.com
  2. Other LLM gatewaysAnthropic (Claude Code docs) code.claude.com
  3. LLM10:2025 Unbounded ConsumptionOWASP Gen AI Security Project genai.owasp.org

Changelog

  • First published.

Cite this page

Agents for Devs. "What is an AI gateway?." Published Dec 6, 2026. https://agentsfordevs.com/glossary/ai-gateway
Cite one section