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.

Warning
Treat your API keys like passwords. Keep them secret — use only on the server side.

Do not share your API key with anyone. Do not include it in any client-side code, that ends up in the browsers. For production requests, it is imperative to route them through your own backend server, where you can securely retrieve your API key from an environment variable or a secret key management service.


Org API Key

Let's create an API key for your organization.


Step #1 Go to organization settings

  1. Login to your account on Langbase.
  2. Navigate to your organization profile page.
  3. Click on the Settings button at the top right corner. This will open the settings of your organization.

Step #2 Org API Keys section

  1. Scroll down to the bottom of the page to a section called "Org API Keys".
  2. Click on the Generate API Key button.

Step #3 Generate a new API Key

  1. A modal will appear asking you to enter a unique name for the your API key. Let's call it Org API Key.
  2. Click on Generate API Key button to generate the API key.

Step #4 Copy the API Key

  1. Once the API key is generated, it will be displayed on the screen. Use the copy button to copy the key.
  2. Store the key securely as you will not be able to view it another time.
  3. Once copied, click on the Done button to close the modal.

User API Key

Let's create an API key for your profile.


Step #1 Go to profile settings

  1. Login to your account on Langbase.
  2. Navigate to your profile page.
  3. Click on the Settings button at the top right corner. This will open the settings page of your profile.

Step #2 User API Keys section

  1. Scroll down to the bottom of the page to a section called "User API Keys".
  2. Click on the Generate API Key button.

Step #3 Generate a new API Key

  1. A modal will appear asking you to enter a unique name for the your API key. Let's call it API Key.
  2. Click on Generate API Key button to generate the API key.

Step #4 Copy the API Key

  1. Once the API key is generated, it will be displayed on the screen. Use the copy button to copy the key.
  2. Store the key securely as you will not be able to view it another time.
  3. Once copied, click on the Done button to close the modal.

✨ Congrats, you have created your first API key. We're excited to see what you build with it.