Pointing the LangSmith SDK and CLI at a non-US regional endpoint

Last updated: July 16, 2026

Symptom

Your LangSmith org is hosted in EU, APAC, or AWS US, but running the SDK or langsmith auth / langgraph auth fails or behaves as if the API key is invalid: auth errors, missing traces, or the wrong org context. The client is talking to the US endpoint, and the API key from your non-US org is not valid there.

Cause

LangSmith clients (Python SDK, JS SDK, and the CLI) pick the API endpoint in this order:

  1. Explicit constructor or flag argument

  2. LANGSMITH_ENDPOINT environment variable

  3. LANGCHAIN_ENDPOINT (legacy alias)

  4. A saved CLI profile's api_url

  5. Built-in default: https://api.smith.langchain.com (GCP US)

There is no region auto-detection. An API key from a non-US org carries no region hint, so if you do not override the endpoint the client falls through to the US default and the key is rejected.

Data also does not cross regions. An org created at apac.smith.langchain.com only exists in APAC, so its keys only work against the APAC API.

Resolution

Generate the key in the regional UI, then point every environment where the SDK or CLI runs at that region's API URL.

1. Create the API key in the correct regional UI

Region

UI URL

GCP US (default)

https://smith.langchain.com

GCP EU

https://eu.smith.langchain.com

GCP APAC

https://apac.smith.langchain.com

AWS US

https://aws.smith.langchain.com

2. Set the endpoint and key in the environment

Export both variables wherever the SDK, langsmith auth, or langgraph auth runs. Example for APAC:

export LANGSMITH_ENDPOINT="https://apac.api.smith.langchain.com"
export LANGSMITH_API_KEY="<key from the APAC org>"

Substitute the API URL for your region:

Region

API URL

GCP US

https://api.smith.langchain.com

GCP EU

https://eu.api.smith.langchain.com

GCP APAC

https://apac.api.smith.langchain.com

AWS US

https://aws.api.smith.langchain.com

These two variables are enough. With them set, langgraph auth and the SDKs authenticate against the correct region.

3. Optional: save the region in a CLI profile

To avoid setting LANGSMITH_ENDPOINT in every shell, save the regional URL in the CLI profile's api_url field. The CLI will then use that URL by default.

References