This guide explains how to configure API keys for OpenAI to enable Discourse AI features that require 3rd party LLM keys.
Required user level: Administrator
In this example, we are using 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), Google (Gemini), etc.
Please check each AI module to see which 3rd party providers can be used for it.
Generate the API key
- Log in to Open AI. An API key can be obtained here OpenAI Platform
- Generate the API Key
- Once the key is generated, store it in a safe and secure place and copy it
Using API key for Discourse AI
Discourse AI uses a Secrets system to manage API keys. Instead of pasting keys directly into individual LLM configurations, you create a named secret and then reference it from one or more LLMs.
Create a Secret (optional can be done inline)
- Go to
Admin→Plugins→AI→Secretstab - Click New Secret
- Enter a name for the secret (e.g. “OpenAI API Key”)
- Paste your API key into the Secret field
- Save the secret
Configure an LLM
- Go to
Admin→Plugins→AI→LLMstab - Select a pre-configured model template (e.g. an OpenAI model) and click its Configure button, or click Edit on an already configured LLM
- In the API Key field, select the secret you created from the dropdown. You can also create a new secret inline by clicking the + button next to the dropdown.
- Save the LLM
Last edited by @sam 2026-03-23T21:53:37Z
Check document
Perform check on document:

