Skip to main content
The standard LLM Gateway API supports three request and response formats. Choose the format your application already uses, then call models across configured providers with provider-prefixed model IDs.
Beta: The LLM Gateway is in beta.

Compare API formats

All formats authenticate with a workspace-scoped LangSmith API key. Pass it as the provider API key or as an Authorization: Bearer token. Set model to <provider>/<model>, such as openai/gpt-5.4-mini or anthropic/claude-sonnet-4-6. The request format does not limit which configured provider you can call.

Use Chat Completions

Point an OpenAI-compatible client at https://gateway.smith.langchain.com/v1. For the full request and response schema, see the OpenAI Chat Completions API.

Use Messages

Point an Anthropic client at https://gateway.smith.langchain.com. For the full request and response schema, see the Anthropic Messages API.

Use Responses

Point an OpenAI-compatible client at https://gateway.smith.langchain.com/v1. For the full request and response schema, see the OpenAI Responses API.

Understand translation behavior

The endpoint determines the format your application sends and receives. The model ID determines the upstream provider.
  • When the provider supports the selected format natively, the gateway preserves that format.
  • Otherwise, the gateway translates the request into a format supported by the provider and translates the response back, including streaming responses.
  • Translation can reject fields that cannot be represented in the target provider format. Use Direct model access when provider-native behavior is required.
Every request resolves the same Provider Secrets, policies, and tracing configuration regardless of format.

List models

Call GET /v1/models to list models available across providers configured for the workspace. The gateway aggregates each provider’s model catalog into a single OpenAI-compatible list:
Every model ID is prefixed with the provider name in the form <provider>/<model>; use this prefixed ID as model when making a call. A provider without a configured secret is omitted.

Use a regional gateway

Replace gateway.smith.langchain.com with the hostname for your LangSmith region: Keep the same path for the selected API format.

Handle errors

For setup-specific resolutions, see the Quickstart.

See also