Vault is designed to securely store and access sensitive information, such as API keys (e.g., OPENAI_API_TOKEN), eliminating the need to directly embed them in your code or environment variables. This centralized approach ensures that all developers can securely share and use the same API key without the necessity of distributing individual keys.

Key Features

  • Secrets Management: Seamlessly create, edit, and monitor the secrets associated with your applications.
  • Secure Access: Retrieve secrets based on keys or tags, and safely integrate them into your Node.js or Python environments.

Get Started

1

List of Secrets

Get a quick overview of all secrets created.

  1. Navigate to the Vault in OpenLIT.
  2. Explore the available secrets listed.
2

Create or Edit a secret

Build new secret with ease.

  1. Click on + New to create a new secret
  2. In the secret form, add the secret key, secret value and add tags to easily manage and access the secrets via sdk.
3

Retrieve the secret(s)

1

Create an API Key

To authenticate your requests, you need an API key. Here’s how you can create one:

  • Go to the OpenLIT.
  • Navigate to the API Keys page.
  • Click on Create API Key.
  • Enter a name for your API key.
  • Save the API key displayed. Ensure you store it securely as it will be used for authentication in the SDK.
2

Get secret(s) using the SDK

Here’s how you can fetch and set environment secret(s) in Python:

import openlit

response = openlit.get_secrets(
  url="http://127.0.0.1:3000", 
  api_key="_OPENLIT_API_KEY",  
  should_set_env=True
)

print(response)               
Output
{
  err: null,
  res: { ANTHROPIC_API_KEY: 'ANTHROPIC_API_VALUE', OPENAI_API_KEY: 'OPENAI_API_VALUE' }
}

SDK Parameters

Below are the parameters for use with the SDK, formatted to indicate whether each is required or optional:

ParameterDescription
urlSets the Openlit URL. Defaults to the OPENLIT_URL environment variable.
api_keySets the OpenLIT API Key. Can also be provided via the OPENLIT_API_KEY environment variable.
keySets the key to fetch a specific secret. Optional
should_set_envBoolean value that sets all the secrets as environment variables for the application. Optional
tagsSets the tags for fetching only the secrets that have the mentioned tags assigned. Optional