Environment Variables

Set and clear the environment variables of an app.

Environment variables configure an app, such as the model it uses, an API key for a search provider, email settings or a time zone. They are stored encrypted and reach the app at its next start: after a change, the app's restart_required is true until you restart it.

PUT    /v1/launchpad/apps/:app_id/env/:key
DELETE /v1/launchpad/apps/:app_id/env/:key

List an app's variables with Retrieve an app. The list holds every variable the app supports, whether you set it or not. Values come with include_env_values=true, which needs a key whose creator may manage apps in the workspace.

What you can change

You can't add variables of your own: the list shows every variable the app supports, and setting or clearing any other name returns 400. Variables are grouped (group) into sections such as AI models, Search, Email and App, and each one has a short help text.

  • Settings such as a model, your own keys for search or AI providers, email and app options. Change or clear them at any time.
  • Connection variables (group is AI connection): the variables that connect the app to its AI provider, such as a base URL and an API key. While the app uses the Aivene AI connection they are read-only: listed with managed: true and no value, and setting or clearing one returns 400. Switch the app to your own provider (ai_mode: custom, Update an app) to fill them in yourself. Some apps take your own provider only in their own settings; those apps don't list their connection variables in that mode (the catalog's custom_provider_in_app is true), so set the provider inside the app.

Some variables are managed by Launchpad and are not shown, such as the app's ports, paths, address, login and the settings that keep it running safely. Setting one returns 400.

Not set, set and empty

  • Not set (is_set: false): you never set it. The app uses default when there is one, else its own default. example shows the shape a value takes.
  • Set (is_set: true): the app gets your value.
  • Cleared: clearing a variable keeps it in the list with an empty value (value: "", is_set: true). The app gets an empty value, not the default; set the default again to go back to it. In AnythingLLM an empty value is not passed at all, so the setting saved in the app applies.

Rules

  • A value is at most 8 KiB.
  • An app's variables hold at most 256 KiB in all.
  • A key is matched in any case and stored as the app lists it.
  • Variables can't be set or cleared while the app is expired, suspended or deleting.

The variable object

type'launchpad_env_var'optional

Always launchpad_env_var.

keystringoptional

The variable's name.

valuestring | nulloptional

The value you set, possibly "" after a clear. Only with include_env_values=true and in the answer of a PUT; otherwise, and always for a read-only connection variable or one that is not set, null.

updated_atstringoptional

When its value was last set; the app's creation when it was never set.

managedbooleanoptional

true for a connection variable while the app uses the Aivene AI connection: it has no value and can't be set or cleared.

origin'image' | 'user'optional

Always image: every variable comes from the app's image.

is_setbooleanoptional

false while you never set the variable: the app uses default, else its own default. true once set, an empty value included, and for a managed one.

storedbooleanoptional

true when a value of yours is stored, an empty one included.

differs_from_defaultbooleanoptional

true when your value is not default (any value you set when there is no default).

groupstringoptional

The section it belongs to: AI connection, AI models, AI providers, Search, Email, Integrations, Network or App.

helpstringoptional

One line on what it changes in the app.

secretbooleanoptional

true for a key, token or password. The console masks its value; the API returns it under the same rules as any other value.

defaultstring | nulloptional

What the app gets while the variable is not set, or null when the app uses its own default.

examplestring | nulloptional

An example value, or null.