Beta: The LLM Gateway is in beta.
Choose a provider path
Append a provider path to your regional gateway base URL:
Gateway Credits models use the standard endpoint rather than a provider-specific path. These hosted models require no provider secret of your own.
Configure provider SDKs
Set each provider SDK’s base URL to its direct gateway path and use your LangSmith API key as the provider API key:Configure LangChain and Deep Agents
LangChain chat models and Deep Agents, including Deep Agents Code, support direct gateway paths through a convenience environment variable:https://gateway.smith.langchain.com, using LANGSMITH_API_KEY for authentication. To use a regional gateway, set its URL instead of true:
If you need to use a different API key for gateway calls than your default
LANGSMITH_API_KEY, set LANGSMITH_GATEWAY_API_KEY as an override. It must be a workspace-scoped key with the gateway:invoke permission.Supported models and configuration precedence
Supported models and configuration precedence
- Supported in Python only.
- Supported chat models:
- Anthropic (
langchain-anthropic >= 1.5.1) - Baseten (
langchain-baseten >= 0.2.3) - Fireworks (
langchain-fireworks >= 1.5.1) - Google Gemini (
langchain-google-genai >= 4.3.2) - OpenAI (
langchain-openai >= 1.4.1)
- Anthropic (
- Provider-specific base URLs take precedence over the gateway setting. For example,
OPENAI_API_BASEsends OpenAI to that URL while every other supported provider continues to use the gateway.
Use a regional gateway
If your LangSmith account is on a regional instance, use the corresponding regional gateway and append the provider path. For example, usehttps://eu.gateway.smith.langchain.com/anthropic for direct Anthropic access in GCP EU.
See also
- Quickstart: use the standard API to call models across providers.
- Admin setup: configure provider secrets and access.
- Traces, Engine, and access control: see where gateway traces appear and who can view them.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

