You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/langsmith/create-account-api-key.mdx
+37-24Lines changed: 37 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,7 @@ LangSmith supports two types of API keys. You can use both types of token to aut
13
13
-[**Personal Access Tokens (PATs)**](/langsmith/administration-overview#personal-access-tokens-pats) inherit the permissions of the user who created them. Use PATs for personal scripts or tools.
14
14
-[**Service keys**](/langsmith/administration-overview#service-keys) can be scoped to specific [workspaces](/langsmith/administration-overview#workspaces) or the entire [organization](/langsmith/administration-overview#organizations). Use service keys for applications and production services.
15
15
16
-
### Create an API key
17
-
18
-
To log traces and run evaluations with LangSmith, you will need to create an API key to authenticate your requests.
16
+
To log traces and run evaluations with LangSmith, create an API key to authenticate your requests.
19
17
20
18
<Steps>
21
19
<Steptitle="Open API Keys settings"icon="settings">
@@ -30,41 +28,56 @@ To log traces and run evaluations with LangSmith, you will need to create an API
30
28
Set the key's expiration. The key becomes unusable after the number of days chosen, or never, if that is selected.
31
29
</Step>
32
30
<Steptitle="Create the key"icon="circle-check">
33
-
Click **Create API Key.**
34
-
35
-
<Note>
36
-
LangSmith will display the API key only once, so make sure to copy it and store it in a safe place.
37
-
</Note>
31
+
Click **Create API Key.** LangSmith will display the API key only once, so make sure to copy it and store it in a safe place.
38
32
</Step>
39
33
</Steps>
40
34
41
-
### Delete an API key
42
-
43
-
<Steps>
44
-
<Steptitle="Open API Keys settings"icon="settings">
45
-
Navigate to the [Settings page](https://smith.langchain.com/settings) and scroll to the **API Keys** section.
46
-
</Step>
47
-
<Steptitle="Find the key"icon="search">
48
-
Find the API key you need to delete from the table. Toggle **Personal** or **Service** as needed.
49
-
</Step>
50
-
<Steptitle="Delete the key"icon="trash">
51
-
Select the trash icon <Iconicon="trash"iconType="solid"/> in the **Actions** column and confirm deletion.
52
-
</Step>
53
-
</Steps>
35
+
<Tip>
36
+
To delete an API key, navigate to the [Settings page](https://smith.langchain.com/settings), find the key in the **API Keys** section, and select the trash icon <Iconicon="trash"iconType="solid"/> in the **Actions** column.
37
+
</Tip>
54
38
55
39
## Configure the SDK
56
40
57
-
After setting `LANGSMITH_API_KEY`, you may need the following additional environment variables.
41
+
Install the SDK for your language:
42
+
43
+
<Tabs>
44
+
<Tabtitle="Python">
45
+
<CodeGroup>
46
+
```bash pip
47
+
pip install langsmith
48
+
```
49
+
```bash uv
50
+
uv add langsmith
51
+
```
52
+
</CodeGroup>
53
+
</Tab>
54
+
<Tabtitle="TypeScript">
55
+
```bash
56
+
npm install langsmith
57
+
```
58
+
</Tab>
59
+
</Tabs>
60
+
61
+
For full details, refer to the [Python SDK](/langsmith/smith-python-sdk) or [JS/TS SDK](/langsmith/smith-js-ts-sdk) reference.
62
+
63
+
Then, set your API key and enable tracing:
64
+
65
+
```bash
66
+
export LANGSMITH_API_KEY=<your-api-key>
67
+
export LANGSMITH_TRACING=true
68
+
```
69
+
70
+
You may also need the following additional environment variables.
58
71
59
72
`LANGSMITH_ENDPOINT` controls which LangSmith server the SDK sends data to. It defaults to `https://api.smith.langchain.com` (US cloud). Set it only if you are on a different deployment:
60
73
61
74
- EU instance: `LANGSMITH_ENDPOINT=https://eu.api.smith.langchain.com`
62
75
- AWS-hosted US instance: `LANGSMITH_ENDPOINT=https://aws.api.smith.langchain.com`
63
76
64
-
`LANGSMITH_WORKSPACE_ID` is required only if your API key is scoped to more than one [workspace](/langsmith/administration-overview#workspaces):
77
+
`LANGSMITH_WORKSPACE_ID` is required only if your API key is scoped to more than one [workspace](/langsmith/administration-overview#workspaces). Find your Workspace ID on the [Settings page](https://smith.langchain.com/settings) under **General**:
65
78
66
79
`LANGSMITH_WORKSPACE_ID=<Workspace ID>`
67
80
68
-
## Using API keys outside of the SDK
81
+
## Use API keys outside of the SDK
69
82
70
83
See [instructions for managing your organization via API](/langsmith/manage-organization-by-api).
Copy file name to clipboardExpand all lines: src/oss/langgraph/studio.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This pages describes how to set up Studio with your local LangChain agent.
13
13
Before you begin, ensure you have the following:
14
14
15
15
-**A LangSmith account**: Sign up (for free) or log in at [smith.langchain.com](https://smith.langchain.com).
16
-
-**A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key#create-an-api-key) guide.
16
+
-**A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key) guide.
17
17
- If you don't want data [traced](/langsmith/observability-concepts#traces) to LangSmith, set `LANGSMITH_TRACING=false` in your application's `.env` file. With tracing disabled, no data leaves your local server.
Copy file name to clipboardExpand all lines: src/snippets/oss/studio-js.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ This pages describes how to set up Studio with your local LangChain agent.
9
9
Before you begin, ensure you have the following:
10
10
11
11
-**A LangSmith account**: Sign up (for free) or log in at [smith.langchain.com](https://smith.langchain.com).
12
-
-**A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key#create-an-api-key) guide.
12
+
-**A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key) guide.
13
13
- If you don't want data [traced](/langsmith/observability-concepts#traces) to LangSmith, set `LANGSMITH_TRACING=false` in your application's `.env` file. With tracing disabled, no data leaves your local server.
Copy file name to clipboardExpand all lines: src/snippets/oss/studio-py.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ This pages describes how to set up Studio with your local LangChain agent.
9
9
Before you begin, ensure you have the following:
10
10
11
11
-**A LangSmith account**: Sign up (for free) or log in at [smith.langchain.com](https://smith.langchain.com).
12
-
-**A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key#create-an-api-key) guide.
12
+
-**A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key) guide.
13
13
- If you don't want data [traced](/langsmith/observability-concepts#traces) to LangSmith, set `LANGSMITH_TRACING=false` in your application's `.env` file. With tracing disabled, no data leaves your local server.
0 commit comments