| title | Create an account and API key |
|---|---|
| sidebarTitle | Create an account and API key |
| icon | key |
To get started with LangSmith, you need to create an account. You can sign up for a free account in the LangSmith UI. LangSmith supports sign in with Google, GitHub, and email.
LangSmith supports two types of API keys. You can use both types of token to authenticate requests to the LangSmith API, but they have different use cases:
- Personal Access Tokens (PATs) inherit the permissions of the user who created them. Use PATs for personal scripts or tools.
- Service keys can be scoped to specific workspaces or the entire organization. Use service keys for applications and production services.
To log traces and run evaluations with LangSmith, you will need to create an API key to authenticate your requests.
To create either type of API key:
-
Navigate to the Settings page and select the API Keys section.
-
For service keys, choose between an organization-scoped and workspace-scoped key. If the key is workspace-scoped, you must specify the workspaces.
Enterprise users can also assign specific workspace roles to service keys, which adjusts their permissions independently of any user.
-
Set the key's expiration; the key will become unusable after the number of days chosen, or never, if that is selected.
-
Click Create API Key.
To delete an API key:
- Navigate to the Settings page and scroll to the API Keys section.
- Find the API key you need to delete from the table. Toggle Personal or Service as needed.
- Select the trash icon in the Actions column and confirm deletion.
You may set the following environment variables in addition to LANGSMITH_API_KEY.
This is only required if using the EU instance.
LANGSMITH_ENDPOINT=https://eu.api.smith.langchain.com
This is only required if using the AWS-hosted US instance.
LANGSMITH_ENDPOINT=https://aws.api.smith.langchain.com
This is only required for keys scoped to more than one workspace.
LANGSMITH_WORKSPACE_ID=<Workspace ID>