This guide explains how to configure API keys for Azure OpenAI to enable Discourse AI features that require 3rd party LLM keys.
Required user level: Administrator
In this example, we are using Azure OpenAI to generate the keys.
Note: You will likely need a paid plan and have to pay per usage. See here for up-to-date details and pricing .
Platforms will always change so this guide may not reflect 100% process.
In order to use certain AI modules, users must have an API Key from a 3rd party provider such as OpenAI (ChatGPT), Anthropic (Claude), Stability AI (Stable Diffusion), etc
Please check each AI module to see which 3rd party providers can be used for it.
Obtain API keys
- Go through the documentation here to obtain the necessary API keys depending on the OpenAI models you choose and the Discourse AI modules/features you use
- Once the keys are obtained, store them in a safe and secure place and copy it
Add a Credential
API keys are managed centrally through the Credentials page. You must create a credential before configuring your LLM.
- Go to
AdminβPluginsβAIβCredentials - Click New credential
- Give it a descriptive name (e.g. βAzure OpenAI API Keyβ)
- Paste your Azure API key into the
Valuefield - Save the credential
Using API keys for Discourse AI
- Go to
AdminβPluginsβAIβLLMs - Click on the + New Model button.
- Select the appropriate model from the list.
- Select
Azurefrom theProviderlist - Input the
URL of the service hosting the model
Example URL:
https://{RESOURCE_NAME}.openai.azure.com/openai/deployments/{DEPLOYMENT_NAME}/chat/completions?api-version=2024-02-15-previewwhere
- RESOURCE_NAME is the name of your Azure OpenAI resource
- DEPLOYMENT_NAME is the name of your Azure OpenAI model deployment
- Select the credential you created earlier from the credential dropdown
- Save the LLM
Last edited by @pedro 2025-07-23T20:13:11Z
Check document
Perform check on document:

