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
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
- Navigate to Admin console → Platform → LLMs.
- Click Add LLM.
- Select a hosting provider and configure its credentials.
- Click Validate, select the models you want to make available, and click Save.
Follow the provider-specific instructions in the following tabs.
- Anthropic
- OpenAI
- Azure OpenAI
- Vertex AI
- Amazon Bedrock
You will need an Anthropic API Key from the Anthropic Console to continue.
To use an Anthropic API key:
- Select Anthropic as the hosting provider.
- Paste your Anthropic API key into API key.
- Optional: Enter a custom endpoint in Base URL.
- Click Validate.
- Select the models you want to make available and click Save.
You will need an OpenAI API Key and your OpenAI Organization ID to continue.
To use an OpenAI API key:
- Select OpenAI from the dropdown.
- Select the OpenAI LLM model to use from the dropdown. We recommend selecting the most recent frontier model from the list (for example, GPT-5.1).
- Paste your OpenAI API Key into the OpenAI key field.
- Paste your OpenAI Organization ID into the Organization ID field.
- Click Submit to validate and save your key.
You will need the following to continue:
- Azure OpenAI Key and Endpoint.
- Agentic GPT model deployment name (for example, GPT-5.1).
- Fast agentic GPT model deployment name (for example, GPT-5.1).
- Azure embeddings deployment name (for example, Ada-Embedding, text-embedding-ada-004).
To use your Azure OpenAI key:
- Select Azure OpenAI from the dropdown in the Custom API Key section.
- Paste your Azure OpenAI key into the Key 1 field.
- Paste the endpoint URL into the Endpoint field (drop the
https://as it is not required). - For each of the models listed, paste the deployment name into the field.
- Click Submit to validate and save your settings.
Vertex AI is only supported when your Glean instance is hosted on GCP's infrastructure.
- Select Vertex AI from the dropdown in the Glean UI.
- Select the Vertex AI model to use: Gemini or Claude.
- Follow the prompts to complete the setup process.
Amazon Bedrock is only supported when your Glean instance is hosted on AWS's infrastructure.
- Select Amazon Bedrock from the dropdown in the Glean UI.
- Select the Claude LLM model to use.
- Follow the prompts to complete the setup process.
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
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 Provider | Models Used | Aggregate Avg Cost per Glean Query |
|---|---|---|
| OpenAI | GPT-5.1 Ada Embeddings | $0.07 |
| Azure OpenAI | GPT-5.1 Ada Embeddings | $0.07 |
| Vertex AI - Gemini | Gemini Pro Custom Tools 3.1 Gemini Flash 3.0 Gecko Embeddings | $0.02 |
| Vertex AI - Claude | Claude Sonnet 4.6 Gecko Embeddings | $0.04 |
| Amazon Bedrock - Claude | Claude Sonnet 4.6 Titan Text Embeddings G1 | $0.07 |

