Skip to content

Commit db8ce3d

Browse files
authored
Link references to create account api key page (langchain-ai#3756)
1 parent 39fe6ac commit db8ce3d

10 files changed

Lines changed: 46 additions & 33 deletions

‎src/langsmith/create-account-api-key.mdx‎

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ LangSmith supports two types of API keys. You can use both types of token to aut
1313
- [**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.
1414
- [**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.
1515

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.
1917

2018
<Steps>
2119
<Step title="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
3028
Set the key's expiration. The key becomes unusable after the number of days chosen, or never, if that is selected.
3129
</Step>
3230
<Step title="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.
3832
</Step>
3933
</Steps>
4034

41-
### Delete an API key
42-
43-
<Steps>
44-
<Step title="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-
<Step title="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-
<Step title="Delete the key" icon="trash">
51-
Select the trash icon <Icon icon="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 <Icon icon="trash" iconType="solid"/> in the **Actions** column.
37+
</Tip>
5438

5539
## Configure the SDK
5640

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+
<Tab title="Python">
45+
<CodeGroup>
46+
```bash pip
47+
pip install langsmith
48+
```
49+
```bash uv
50+
uv add langsmith
51+
```
52+
</CodeGroup>
53+
</Tab>
54+
<Tab title="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.
5871

5972
`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:
6073

6174
- EU instance: `LANGSMITH_ENDPOINT=https://eu.api.smith.langchain.com`
6275
- AWS-hosted US instance: `LANGSMITH_ENDPOINT=https://aws.api.smith.langchain.com`
6376

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**:
6578

6679
`LANGSMITH_WORKSPACE_ID=<Workspace ID>`
6780

68-
## Using API keys outside of the SDK
81+
## Use API keys outside of the SDK
6982

7083
See [instructions for managing your organization via API](/langsmith/manage-organization-by-api).

‎src/langsmith/evaluation-quickstart.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This quickstart guides you through running a starter evaluation that checks the
2020
Before you begin, make sure you have:
2121

2222
- **A LangSmith account**: Sign up or log in at [smith.langchain.com](https://smith.langchain.com).
23-
- **A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key#create-an-api-key) guide.
23+
- **A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key) guide.
2424
- **An OpenAI API key**: Generate this from the [OpenAI dashboard](https://platform.openai.com/account/api-keys).
2525

2626
**Select the UI or SDK filter for instructions:**

‎src/langsmith/observability-llm-tutorial.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The application will retrieve relevant documentation snippets and use them to an
2323
Before you begin, make sure you have:
2424

2525
- **A LangSmith account**: Sign up or log in at [smith.langchain.com](https://smith.langchain.com).
26-
- **A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key#create-an-api-key) guide.
26+
- **A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key) guide.
2727
- **An OpenAI API key**: Generate this from the [OpenAI dashboard](https://platform.openai.com/account/api-keys).
2828
- **LangSmith CLI** (optional): Install to inspect traces from the terminal. For instructions, refer to [LangSmith CLI](/langsmith/langsmith-cli).
2929

‎src/langsmith/observability-quickstart.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you're building with [LangChain](https://docs.langchain.com/oss/python/langch
2020
Before you begin, make sure you have:
2121

2222
- **A LangSmith account**: Sign up or log in at [smith.langchain.com](https://smith.langchain.com).
23-
- **A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key#create-an-api-key) guide.
23+
- **A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key) guide.
2424
- **An OpenAI API key**: Generate this from the [OpenAI dashboard](https://platform.openai.com/account/api-keys).
2525

2626
This example uses OpenAI as the LLM provider. You can adapt it for your own provider.

‎src/langsmith/prompt-engineering-quickstart.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ In this quickstart, you’ll create, test, and improve prompts using either the
1616
Before you begin, make sure you have:
1717

1818
- **A LangSmith account**: Sign up or log in at [smith.langchain.com](https://smith.langchain.com).
19-
- **A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key#create-an-api-key) guide.
19+
- **A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key) guide.
2020
- **An OpenAI API key**: Generate this from the [OpenAI dashboard](https://platform.openai.com/account/api-keys).
2121

2222
Select the tab for UI or SDK workflows:

‎src/oss/langchain/observability.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This guide shows you how to enable tracing for your LangChain agents and use Lan
2626
Before you begin, ensure you have the following:
2727

2828
- **A LangSmith account**: Sign up (for free) or log in at [smith.langchain.com](https://smith.langchain.com).
29-
- **A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key#create-an-api-key) guide.
29+
- **A LangSmith API key**: Follow the [Create an API key](/langsmith/create-account-api-key) guide.
3030

3131
## Enable tracing
3232

‎src/oss/langgraph/observability.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Traces are a series of steps that your application takes to go from input to out
1313
Before you begin, ensure you have the following:
1414

1515
- **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.
1717

1818
## Enable tracing
1919

‎src/oss/langgraph/studio.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This pages describes how to set up Studio with your local LangChain agent.
1313
Before you begin, ensure you have the following:
1414

1515
- **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.
1717
- 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.
1818

1919
## Set up local Agent server

‎src/snippets/oss/studio-js.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This pages describes how to set up Studio with your local LangChain agent.
99
Before you begin, ensure you have the following:
1010

1111
- **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.
1313
- 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.
1414

1515
## Set up local Agent server

‎src/snippets/oss/studio-py.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This pages describes how to set up Studio with your local LangChain agent.
99
Before you begin, ensure you have the following:
1010

1111
- **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.
1313
- 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.
1414

1515
## Set up local Agent server

0 commit comments

Comments
 (0)