Skip to main content

Bring Your Own Key (BYOK)

Overview

To enable Glean Generative AI features, you need to select an LLM provider and an associated account.

By default, generative AI features will use an underlying account key provided by Glean, however you can opt to use your own account key for the LLM provider of your choice (as long as the underlying provider is supported by Glean).

Glean currently supports the following LLM Providers:

  • Anthropic
  • OpenAI
  • Azure OpenAI
  • Google Vertex AI
  • Amazon Bedrock
note

There are minimum throughput and capacity requirements that must be met when using your own key. Failure to meet these requirements may result in degraded performance for your users.

For more information, please see the Supported LLMs page.


Configure BYOK

  1. Navigate to Admin console → Platform → LLMs.
  2. Click Add LLM.
  3. Select a hosting provider and configure its credentials.
  4. Click Validate, select the models you want to make available, and click Save.

Follow the provider-specific instructions in the following tabs.

You will need an Anthropic API Key from the Anthropic Console to continue.

To use an Anthropic API key:

  1. Select Anthropic as the hosting provider.
  2. Paste your Anthropic API key into API key.
  3. Optional: Enter a custom endpoint in Base URL.
  4. Click Validate.
  5. Select the models you want to make available and click Save.

Troubleshoot common issues

If validation fails when you submit your key, or you see errors after setup:

  • Check your API key: Confirm the key is still active and hasn't been rotated or revoked in your provider's portal.
  • Check deployment names (Azure OpenAI): Deployment names must match your Azure Portal exactly. See Use GPT models on Azure OpenAI for Azure-specific guidance.
  • Check capacity: Your provider account must meet the minimum throughput requirements listed on the supported LLMs page. Insufficient quota can cause rate-limit errors.

For detailed error codes and resolution steps, see Troubleshoot LLM provider errors.

Estimate LLM usage costs

warning

The following data should be considered an estimate only. It is based on average usage across multiple Glean customers, however your actual usage may vary.

We recommend using Glean's LLM key if you have concerns around LLM usage costs.

The following costs per query can be used as a rough guide to help you estimate your LLM usage costs with Glean. All costs are in USD.

LLM ProviderModels UsedAggregate Avg Cost per Glean Query
OpenAIGPT-5.1
Ada Embeddings
$0.07
Azure OpenAIGPT-5.1
Ada Embeddings
$0.07
Vertex AI - GeminiGemini Pro Custom Tools 3.1
Gemini Flash 3.0
Gecko Embeddings
$0.02
Vertex AI - ClaudeClaude Sonnet 4.6
Gecko Embeddings
$0.04
Amazon Bedrock - ClaudeClaude Sonnet 4.6
Titan Text Embeddings G1
$0.07