---
title: What is an AI gateway?
type: glossary
url: https://agentsfordevs.com/glossary/ai-gateway
markdown: https://agentsfordevs.com/glossary/ai-gateway.md
publisher: Agents for Devs
author: Agents for Devs desk
reviewed_by: Agents for Devs desk
published: 2026-12-06
updated: 2026-12-06
license: https://agentsfordevs.com/reuse
citation: Agents for Devs. "What is an AI gateway?." Published Dec 6, 2026. https://agentsfordevs.com/glossary/ai-gateway
attribution: Credit Agents for Devs and link to https://agentsfordevs.com/glossary/ai-gateway
term: AI gateway
aliases:
  - LLM gateway
  - model gateway
---

# 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.

**Definition:** 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.

```bash
# 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](/glossary/mcp-gateway) · [Agent gateway](/glossary/agent-gateway) · [Audit log](/glossary/audit-log) · [What an MCP gateway does](/guides/mcp-gateway-explained)

## Sources

1. [Connect Claude Code to an LLM gateway, Anthropic (Claude Code docs)](https://code.claude.com/docs/en/llm-gateway-connect)
2. [Other LLM gateways, Anthropic (Claude Code docs)](https://code.claude.com/docs/en/llm-gateway)
3. [LLM10:2025 Unbounded Consumption, OWASP Gen AI Security Project](https://genai.owasp.org/llmrisk/llm102025-unbounded-consumption/)

## Changelog

- 2026-12-06: First published.

## Cite this page

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

- Page: https://agentsfordevs.com/glossary/ai-gateway
- Markdown: https://agentsfordevs.com/glossary/ai-gateway.md
- Reuse: quote or summarize with a link to the page. Terms: https://agentsfordevs.com/reuse
