Skip to content

OpenAI

To use OpenAI as an AI provider in Team Edition, configure it as follows:

  1. Sign up on the OpenAI platform
  2. Navigate to the API Keys section and generate a new secret key
  3. In Team Edition, go to Window -> Preferences -> AI -> Model configurations
  4. Click + and choose OpenAI as the engine to create a profile
  5. Select API token as the login method and insert the API key into the API token field.
  6. Choose the model.
  7. Click Test connection to verify that the key and model work correctly.
  8. Apply the changes.

Note

OpenAI services are available in specific countries. Consult the supported countries list to verify availability in your location.

Configure an OpenAI-compatible endpoint

tag-outline Available since 26.3

You can connect to services that provide an OpenAI-compatible API:

  1. Open Window -> Preferences -> AI -> Model configurations.
  2. Add or edit an OpenAI provider profile.
  3. Enter the endpoint in API base URL. If you leave this field blank, Team Edition uses https://api.openai.com/v1/.
  4. Enter an API token if the endpoint requires Bearer authorization. If you provide a token, Team Edition adds the Authorization: Bearer <api_key> header automatically. Otherwise, leave the field blank.
  5. Open Advanced settings and add any required headers under Custom HTTP headers. Custom headers can replace an automatically added header, including Authorization.
  6. Choose a model, test the connection, and apply the changes.

Custom headers apply when Team Edition loads models and sends requests through either the Responses API or the Chat Completions fallback. Invalid or unsupported headers are rejected with Invalid or unsupported HTTP header: <name>.

Team Edition stores custom-header values as profile secrets.

Example

Configure an endpoint that uses an API key in a custom header as follows:

  • API base URL: https://llm.example.com/v1/.
  • API token: Leave blank.
  • Custom HTTP headers: X-API-Key: <api_key>.

Settings

Setting Description Default
API token Enter the provider token if the endpoint requires Bearer authorization
Model Choose the AI model. Models are loaded dynamically and can be refreshed using the Refresh models button next to the field. You can also type a model name manually.
Context window size A larger number allows the AI to use more data for better answers but may slow down response time. The size is set dynamically based on the selected model when available. ChatGPT account connections use 128000 as a fallback. Model-dependent
Temperature Control AI's creativity from 0.0 (more precise) to 0.9 (more diverse).
Note that higher temperature can lead to less predictable results.
0.0
API base URL The address where requests to the AI service are sent (for example, https://api.openai.com/v1/). Normally this is filled automatically for the selected provider. Change it only if you use a custom endpoint. https://api.openai.com/v1/
Custom HTTP headers Additional HTTP headers required by the endpoint; available under Advanced settings
Use environment variables Read supported environment variables to override saved settings; available under Advanced settings Off
Request timeout (sec) Maximum time Team Edition waits for a response from the AI engine before the request fails; available under Advanced settings 30
Write AI queries to debug log Logs your AI requests. For more details on logging, see Log Viewer; available under Advanced settings disabled

Tip

If you use OpenAI with a model that supports tool calling, AI tools are available.

Use environment variables

Variable Description
OPENAI_API_KEY API token
OPENAI_BASE_URL API base URL
DBEAVER_AI_OPENAI_MODEL Model name

Token and base URL overrides apply to API token authentication, not ChatGPT account authentication.