User/Org API Keys
API keys are required to authenticate with the REST API of Langbase. You will need to send the API key in the Authorization
header of your requests.
Org API Key
Let's create an API key for your organization.
Step #1 Go to organization settings
- Login to your account on Langbase.
- Navigate to your organization profile page.
- Click on the
Settings
button at the top right corner. This will open the settings of your organization.
![Go to organization settings](https://raw.githubusercontent.com/LangbaseInc/docs-images/main/api-reference/settings-org-light.jpg)
Step #2 Org API Keys section
- Scroll down to the bottom of the page to a section called "Org API Keys".
- Click on the
Generate API Key
button.
![Org API Keys Section](https://raw.githubusercontent.com/LangbaseInc/docs-images/main/api-reference/org-api-keys-light.jpg)
Step #3 Generate a new API Key
- A modal will appear asking you to enter a unique name for the your API key. Let's call it
Org API Key
. - Click on
Generate API Key
button to generate the API key.
![Generate a new API Key](https://raw.githubusercontent.com/LangbaseInc/docs-images/main/api-reference/org-api-key-create-light.jpg)
Step #4 Copy the API Key
- Once the API key is generated, it will be displayed on the screen. Use the copy button to copy the key.
- Store the key securely as you will not be able to view it another time.
- Once copied, click on the
Done
button to close the modal.
![Copy the API Key](https://raw.githubusercontent.com/LangbaseInc/docs-images/main/api-reference/org-api-key-copy-light.jpg)
User API Key
Let's create an API key for your profile.
Step #1 Go to profile settings
- Login to your account on Langbase.
- Navigate to your profile page.
- Click on the
Settings
button at the top right corner. This will open the settings page of your profile.
![Go to profile settings](https://raw.githubusercontent.com/LangbaseInc/docs-images/main/api-reference/settings-user-light.jpg)
Step #2 User API Keys section
- Scroll down to the bottom of the page to a section called "User API Keys".
- Click on the
Generate API Key
button.
![User API Keys Section](https://raw.githubusercontent.com/LangbaseInc/docs-images/main/api-reference/user-api-keys-light.jpg)
Step #3 Generate a new API Key
- A modal will appear asking you to enter a unique name for the your API key. Let's call it
API Key
. - Click on
Generate API Key
button to generate the API key.
![Generate a new API Key](https://raw.githubusercontent.com/LangbaseInc/docs-images/main/api-reference/user-api-key-create-light.jpg)
Step #4 Copy the API Key
- Once the API key is generated, it will be displayed on the screen. Use the copy button to copy the key.
- Store the key securely as you will not be able to view it another time.
- Once copied, click on the
Done
button to close the modal.
![Copy the API Key](https://raw.githubusercontent.com/LangbaseInc/docs-images/main/api-reference/user-api-key-copy-light.jpg)
✨ Congrats, you have created your first API key. We're excited to see what you build with it.