> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Private connectivity

> Connect to LangSmith Cloud without exposing traffic to the public internet using AWS PrivateLink, GCP Private Service Connect, or Azure Private Link.

## Private connectivity (Enterprise)

[**Enterprise only.**](https://docs.langchain.com/langsmith/pricing-plans.md) Private connectivity is available exclusively for Enterprise customers. Contact your account representative or [sales@langchain.dev](mailto:sales@langchain.dev) to enable this feature.

Enterprise customers can connect to LangSmith without exposing traffic to the public internet using **AWS PrivateLink**, **GCP Private Service Connect (PSC)**, or **Azure Private Link**.

### AWS PrivateLink

Customers on **AWS** can connect to LangSmith via [AWS PrivateLink](https://docs.aws.amazon.com/vpc/latest/privatelink/), providing private connectivity from any VPC. Cross-region connectivity is supported natively.

#### Endpoint service name

| Region | Service Name |
| - | - |
| US (`us-east-2`) | `com.amazonaws.vpce.us-east-2.vpce-svc-054f37092752bff6b` |

#### Setup

**1. Request access:** Contact your account representative or [sales@langchain.dev](mailto:sales@langchain.dev) with your AWS account ID. LangChain will add your account to the endpoint service's allowed principals list.

**2. Create an Interface VPC Endpoint** in your AWS account. Attach a security group that allows **TCP 443 inbound** from your VPC CIDR (or from the instances that need to reach LangSmith):

```bash AWS CLI theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
aws ec2 create-vpc-endpoint \
  --vpc-id <YOUR_VPC_ID> \
  --service-name <SERVICE_NAME_FROM_TABLE_ABOVE> \
  --vpc-endpoint-type Interface \
  --subnet-ids <YOUR_SUBNET_IDS> \
  --security-group-ids <YOUR_SECURITY_GROUP_ID> \
  --region <YOUR_REGION>
```

```hcl Terraform theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
resource "aws_vpc_endpoint" "langsmith" {
  vpc_id              = "<YOUR_VPC_ID>"
  service_name        = "<SERVICE_NAME_FROM_TABLE_ABOVE>"
  vpc_endpoint_type   = "Interface"
  subnet_ids          = ["<YOUR_SUBNET_IDS>"]
  security_group_ids  = ["<YOUR_SECURITY_GROUP_ID>"]
}
```

**3. Wait for acceptance.** LangChain will accept the connection. The endpoint status will change from `pendingAcceptance` to `available`. Allow a few minutes after acceptance for the change to fully propagate before testing connectivity.

#### Configure DNS

Configure DNS so that `aws.api.smith.langchain.com` resolves to your VPC endpoint's private DNS name within your VPC. You can use any private DNS solution: Route 53 Private Hosted Zones, a corporate DNS resolver, or any DNS server reachable from your VPC.

First, get your endpoint's DNS name:

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
aws ec2 describe-vpc-endpoints \
  --vpc-endpoint-ids <YOUR_ENDPOINT_ID> \
  --query 'VpcEndpoints[0].DnsEntries[0].DnsName' \
  --output text --region <YOUR_REGION>
```

Then, create a CNAME record for `aws.api.smith.langchain.com` pointing to that DNS name. Here's an example using Route 53:

```bash AWS CLI theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
aws route53 create-hosted-zone \
  --name aws.api.smith.langchain.com \
  --vpc VPCRegion=<YOUR_REGION>,VPCId=<YOUR_VPC_ID> \
  --caller-reference langsmith-privatelink-$(date +%s) \
  --hosted-zone-config PrivateZone=true

aws route53 change-resource-record-sets \
  --hosted-zone-id <HOSTED_ZONE_ID> \
  --change-batch '{
    "Changes": [{
      "Action": "CREATE",
      "ResourceRecordSet": {
        "Name": "aws.api.smith.langchain.com",
        "Type": "CNAME",
        "TTL": 300,
        "ResourceRecords": [{"Value": "<ENDPOINT_DNS_NAME>"}]
      }
    }]
  }'
```

```hcl Terraform theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
resource "aws_route53_zone" "langsmith_privatelink" {
  name = "aws.api.smith.langchain.com"

  vpc {
    vpc_id = "<YOUR_VPC_ID>"
  }
}

resource "aws_route53_record" "langsmith_privatelink" {
  zone_id = aws_route53_zone.langsmith_privatelink.zone_id
  name    = "aws.api.smith.langchain.com"
  type    = "CNAME"
  ttl     = 300
  records = [aws_vpc_endpoint.langsmith.dns_entry[0]["dns_name"]]
}
```

#### Verify connectivity

From an EC2 instance or container in your VPC:

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
curl https://aws.api.smith.langchain.com/ok
```

### GCP Private Service Connect

Enterprise customers on **GCP** can connect to LangSmith via [Private Service Connect (PSC)](https://cloud.google.com/vpc/docs/private-service-connect), providing private connectivity without exposing traffic to the public internet.

#### Service attachment URIs

Use the following service attachment URIs to create a PSC endpoint in your VPC:

| Region | Service Attachment URI |
| - | - |
| US (`us-central1`) | `projects/langchain-prod/regions/us-central1/serviceAttachments/gateway-psc-publish` |
| EU (`europe-west4`) | `projects/langchain-prod/regions/europe-west4/serviceAttachments/gateway-psc-publish` |
| APAC (`australia-southeast1`) | `projects/langchain-apac-prod/regions/australia-southeast1/serviceAttachments/gateway-psc-publish` |

#### PSC domains

After setup, use the following domains to connect to LangSmith over your PSC connection:

| Region | Domain |
| - | - |
| US | `us-central1.p.api.smith.langchain.com` |
| EU | `europe-west4.p.api.smith.langchain.com` |
| APAC | `australia-southeast1.p.api.smith.langchain.com` |

#### Setup

**Request access:** Contact your account representative or [sales@langchain.dev](mailto:sales@langchain.dev) with your GCP project ID. LangChain will add your project to the service attachment's allowed consumer list.

After access is granted, create a PSC endpoint and configure DNS using either the gcloud CLI or Terraform.

#### Create a PSC endpoint

Create a forwarding rule in your VPC targeting the service attachment:

```bash gcloud CLI theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
# Create the PSC endpoint
gcloud compute forwarding-rules create langsmith-psc-endpoint \
  --region=<REGION> \
  --network=<YOUR_VPC_NETWORK> \
  --subnet=<YOUR_SUBNET> \
  --target-service-attachment=projects/langchain-prod/regions/<REGION>/serviceAttachments/gateway-psc-publish \
  --load-balancing-scheme=""

# Get the assigned IP address
gcloud compute forwarding-rules describe langsmith-psc-endpoint \
  --region=<REGION> \
  --format="value(IPAddress)"
```

```hcl Terraform theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
resource "google_compute_forwarding_rule" "langsmith_psc" {
  name                  = "langsmith-psc-endpoint"
  project               = "<YOUR_PROJECT_ID>"
  region                = "<REGION>"
  network               = "<YOUR_VPC_NETWORK>"
  subnetwork            = "<YOUR_SUBNET>"
  target                = "projects/langchain-prod/regions/<REGION>/serviceAttachments/gateway-psc-publish"
  load_balancing_scheme = ""
}
```

#### Configure DNS

Create a private DNS zone in your VPC and add an A record pointing to the PSC endpoint IP:

```bash gcloud CLI theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
# Create a private DNS zone
gcloud dns managed-zones create langsmith-psc \
  --dns-name="<REGION>.p.api.smith.langchain.com." \
  --visibility=private \
  --networks=<YOUR_VPC_NETWORK>

# Add an A record pointing to the PSC endpoint IP
gcloud dns record-sets create "<REGION>.p.api.smith.langchain.com." \
  --zone=langsmith-psc \
  --type=A \
  --rrdatas=<PSC_ENDPOINT_IP>
```

```hcl Terraform theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
resource "google_dns_managed_zone" "langsmith_psc" {
  name        = "langsmith-psc"
  project     = "<YOUR_PROJECT_ID>"
  dns_name    = "<REGION>.p.api.smith.langchain.com."
  visibility  = "private"

  private_visibility_config {
    networks {
      network_url = "<YOUR_VPC_NETWORK_SELF_LINK>"
    }
  }
}

resource "google_dns_record_set" "langsmith_psc" {
  name         = "<REGION>.p.api.smith.langchain.com."
  project      = "<YOUR_PROJECT_ID>"
  managed_zone = google_dns_managed_zone.langsmith_psc.name
  type         = "A"
  ttl          = 300
  rrdatas      = [google_compute_forwarding_rule.langsmith_psc.ip_address]
}
```

#### Verify connectivity

From a VM in your VPC:

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
curl https://<REGION>.p.api.smith.langchain.com/ok
```

### Azure Private Link

Customers on **Azure** can connect to the LangSmith Azure SaaS API through [Azure Private Link](https://learn.microsoft.com/en-us/azure/private-link/private-link-overview). A private endpoint in your virtual network (VNet) connects to the LangSmith Private Link service.

#### Request access

Contact your account representative or [sales@langchain.dev](mailto:sales@langchain.dev) with your Azure subscription ID and desired endpoint region. LangChain adds your subscription to the Private Link service auto-approval list. LangChain also provides the service resource ID.

Wait for LangChain to confirm that subscription access is enabled before creating your private endpoint. New connections from an allowlisted subscription are approved automatically. Connections from other subscriptions require manual approval.

#### Create a private endpoint

Use an existing subnet in your VNet. Set the endpoint location to the subnet's region. Replace the placeholders with your Azure resource details and the service resource ID provided by LangChain.

The following Terraform example uses the [AzureRM provider](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_endpoint):

```hcl Terraform theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
resource "azurerm_private_endpoint" "langsmith" {
  name                = "langsmith-private-endpoint"
  location            = "<YOUR_SUBNET_REGION>"
  resource_group_name = "<YOUR_RESOURCE_GROUP>"
  subnet_id           = "<YOUR_SUBNET_ID>"

  private_service_connection {
    name                           = "langsmith"
    private_connection_resource_id = "<LANGSMITH_PRIVATE_LINK_SERVICE_RESOURCE_ID>"
    is_manual_connection           = false
  }
}

output "langsmith_private_endpoint_id" {
  value = azurerm_private_endpoint.langsmith.id
}
```

Apply the configuration and wait until the connection status is `Approved` before testing connectivity. If the connection remains `Pending`, send the private endpoint ID to LangChain to confirm subscription access and resolve the pending request.

#### Configure DNS

Configure private DNS so that `azure.api.smith.langchain.com` resolves to your private endpoint's IP address inside your VNet. Add the following resources to the same Terraform configuration:

```hcl Terraform theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
resource "azurerm_private_dns_zone" "langsmith" {
  name                = "azure.api.smith.langchain.com"
  resource_group_name = "<YOUR_RESOURCE_GROUP>"
}

resource "azurerm_private_dns_a_record" "langsmith" {
  name                = "@"
  zone_name           = azurerm_private_dns_zone.langsmith.name
  resource_group_name = "<YOUR_RESOURCE_GROUP>"
  ttl                 = 60
  records             = [azurerm_private_endpoint.langsmith.private_service_connection[0].private_ip_address]
}

resource "azurerm_private_dns_zone_virtual_network_link" "langsmith" {
  name                  = "langsmith-api"
  resource_group_name   = "<YOUR_RESOURCE_GROUP>"
  private_dns_zone_name = azurerm_private_dns_zone.langsmith.name
  virtual_network_id    = "<YOUR_VNET_ID>"
  registration_enabled  = false

  depends_on = [azurerm_private_dns_a_record.langsmith]
}
```

If you use custom DNS servers, configure them to resolve `azure.api.smith.langchain.com` to the private endpoint IP. Linking an Azure private DNS zone alone does not configure your custom resolver.

This example configures private access to the API hostname only. For private access to the LangSmith UI or other services, contact LangChain for additional hostnames.

#### Verify connectivity

From a VM or container in your VNet, confirm that DNS returns the private endpoint IP and HTTPS succeeds:

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
nslookup azure.api.smith.langchain.com
curl --fail --show-error https://azure.api.smith.langchain.com/ok
```

Keep using `https://azure.api.smith.langchain.com` as your LangSmith API endpoint. API keys and workspace permissions still apply.

***

[Connect these docs](https://docs.langchain.com/use-these-docs.md) to your agent of choice via MCP for real-time answers.

[Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/langsmith/cloud-private-connectivity.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
