Service URLs let you access an HTTP service running inside a sandbox (a REST API, a Streamlit app, a Jupyter notebook, API documentation) without tunnels, port forwarding, or CLI tools. Each sandbox + port combination gets its own URL that you can open in a browser, call from code, or share with a teammate.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.

Quick start
Start an HTTP server inside a sandbox, then get a URL to access it:Use cases
| Scenario | How |
|---|---|
| Preview a web app (Streamlit, Jupyter, etc.) | sb.service(port=<PORT>) then open browser_url |
| Call an API from code or CI | svc.get(...) / svc.post(...) or curl with the service token |
| Share a live demo with a teammate | Click Share Link in the UI and send the URL |
Open a service from the UI
- Open the sandbox detail page.
- Find the Open service widget.
- Type a port number (e.g.
3000). - Click Open to launch in a new tab, or Share Link to copy a URL you can send to a teammate.
Open a service from the SDK
Get a service URL
Callservice() on a sandbox instance or on the client directly:
The service must be running and listening on the specified port before you request a service URL. The URL only routes traffic and does not start a service for you.
Make requests
The returnedServiceURL object has built-in HTTP helpers that handle authentication automatically. Tokens refresh transparently before they expire, so no manual management is needed.
Use your own HTTP client
If you prefer a different HTTP client, use the raw URL and token:Open in a browser
Usebrowser_url to open the service in a browser. It sets an authentication cookie automatically, so all subsequent page loads, images, and API calls are authenticated without tokens in the URL.
Generate a URL via the REST API
Example: serve a FastAPI app
Service URLs vs TCP tunnels
| Service URLs | TCP tunnels | |
|---|---|---|
| Protocol | HTTP | Any TCP (databases, Redis, SSH, HTTP) |
| Setup | Zero — just a URL | Requires SDK or CLI |
| Access from | Browser, scripts, CI, anywhere | Local machine only |
| Sharing | Copy the URL and send it | Not shareable |
| Multi-page web apps | Full support (subdomain routing) | Full support (local port) |
| Non-HTTP services | Not supported | Full support |
psql or redis-cli) or when you need local-only access.
Troubleshoot
| Error | Cause | Fix |
|---|---|---|
| ”Service link has expired” | Token lifetime exceeded | Open the service again from LangSmith or call sb.service() for a fresh URL |
| ”Service is not reachable” | Nothing is listening on that port | Verify the server is running inside the sandbox |
| ”Authentication required” | No token in header or cookie | Use browser_url for browser access or set the X-Langsmith-Sandbox-Service-Token header |
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

