# LangSmith LLM Gateway

## Control every model call

LLM Gateway is the governance layer between your agents and model providers. Enforce spend limits, rate limits, model fallbacks, and sensitive data protection across any model or provider.

## LangSmith helps top teams ship great agents

### Three ways to build, from full harness to full control

Each package solves a different problem. Choose where you want to start, then compose the rest of the stack around it.

### Control Spend

#### Keep model costs within budget

Agent behavior can be hard to predict, and small changes in traffic or tool use can quickly increase model spend. LLM Gateway helps teams monitor usage, set limits, and catch spikes before they become larger problems.

LLM Gateway can:
- **Set** _spending caps for individual or grouped organizations, workspaces, users, and API keys_
- **Monitor** _spend at each of these levels in real time_
- **Record** _policy violations as traces within LangSmith for later review and resolution_

[Learn more](https://docs.langchain.com/langsmith/llm-gateway-spend-policies)

### Ensure Reliability

#### Keep agents running when model providers fail

Model outages, rate limits, and spend limits shouldn't take your agents down with them. With LLM Gateway, teams can configure fallback models and automatically reroute requests when the primary provider fails or a policy blocks a call.

LLM Gateway can:
- **Set** **up** _fallbacks across models, providers, and hosts for high availability_
- **Trigger** _fallbacks on configurable criteria like rate limits or spend control violations_
- **Set** _rate limits at user, workspace, and API key levels_

[Learn more](https://docs.langchain.com/langsmith/llm-gateway-fallbacks)

### Protect Data

#### Keep sensitive data from reaching model providers

Agents often handle PII, credentials, and other sensitive data that shouldn’t leave your environment. LLM Gateway scans model requests and redacts sensitive data before it reaches the provider, so you can meet data handling requirements without disrupting agent behavior.

LLM Gateway can:
- **Detect and redact** [_PII and secrets_](https://docs.langchain.com/langsmith/llm-gateway-redaction) _like tokens, API keys, and social security numbers from model calls_
- **Restore** _original values in the model provider’s response, so redaction doesn't break agent functionality_

[Learn more](https://docs.langchain.com/langsmith/llm-gateway-redaction)

### Provider Flexibility

#### Enforce controls across models

LLM Gateway provides a single interface for routing calls between your agents and model providers, so your controls apply consistently on every call. Choose the best model for each use case while keeping the same governance layer in place.

LLM Gateway can:
- **Support** _a range of models with BYO API key or using Gateway Credits for instant access to models powered by Fireworks_
- **Route** _calls to commercial providers or custom models using OpenAI- and Anthropic-compatible endpoints_
- **Extend** _governance to coding workflows in Claude Code, Codex, Gemini, and_ [_Deep Agents Code_](https://docs.langchain.com/oss/deepagents/code/overview) _(dcode)_

[Learn about Gateway Credits](https://docs.langchain.com/langsmith/llm-gateway-langchain-provider)

### FAQs for LangSmith LLM Gateway

**How do I get access to LLM Gateway?**

LLM Gateway is currently available in Public Beta. [Sign up or log in to LangSmith](https://smith.langchain.com/), where you can [configure LLM Gateway](https://docs.langchain.com/langsmith/llm-gateway-admin-setup) by selecting it in the sidebar.

**Is LLM Gateway available as a standalone product?**

LLM Gateway is currently available with LangSmith Plus and Enterprise plans.

**How is LLM Gateway priced?**

LangSmith LLM Gateway is included with LangSmith Plus and Enterprise plans during Public Beta.

**Where can I host the LLM Gateway?**

For SaaS and BYOC customers, LLM Gateway is hosted in LangChain’s data centers, with regional options spanning NAMER, EMEA, and APAC.

**Which model providers does LLM Gateway support?**

LLM Gateway supports Anthropic, AWS Bedrock, Baseten, Fireworks, Google Gemini, Google Vertex AI, and OpenAI out of the box. Gateway also supports any [OpenAI- and Anthropic-compatible endpoints](https://docs.langchain.com/langsmith/llm-gateway-custom-providers).

**Does LangChain train on data sent through LLM Gateway?**

We will not train on your data, and you own all rights to your data. See LangSmith’s [Terms of Service](/content/terms-of-service/index.html) for more information.

### R e a d y  t o  t a k e  c o n t r o l  o f  y o u r  m o d e l  c a l l s ?

[Start building](https://smith.langchain.com/) [Get a demo](/content/contact-sales/index.html)
