Configure an AI provider API key

Configure an AI provider API key so that it is automatically injected as an environment variable into all your workspaces.

Prerequisites
  • Your administrator has enabled at least one AI provider.

  • You have a valid API key from your AI provider.

Procedure
  1. Configure the API key using one of the following methods:

    • From the Create Workspace page:

      1. Navigate to Create Workspace.

      2. In the AI Provider section, expand Choose an AI Provider.

      3. Click the provider card.

      4. Enter your API key and click Save key.

        A Key configured badge is displayed on the provider card.

    • From User Preferences:

      1. Navigate to User Preferences > AI Providers Keys.

      2. Click Add API Key.

      3. Select the AI provider and enter the API key.

      4. Click Save.

        To update or delete a key, use the edit or delete icons in the table row.

Verification
  1. Start a workspace with the configured AI provider.

  2. Open a terminal and verify that the tool binary is in PATH and the API key variable is set:

    $ which <binary_name>
    $ test -n "$<ENV_VAR_NAME>" && echo "API key is configured"

    Replace <binary_name> and <ENV_VAR_NAME> with the values for your provider (for example, gemini and GEMINI_API_KEY for the Gemini provider).

The API key is available in all workspaces in your namespace, including already running ones.