Configure API Keys for Anthropic

:bookmark: This guide explains how to configure API keys for Anthropic to enable Discourse AI features that require 3rd party LLM keys.

:person_raising_hand: Required user level: Administrator

In this example, we are using Anthropic to generate the keys.

Note: You will need to pay per API usage. See here for up-to-date details and pricing.

Platforms will always change so this guide may not reflect 100% process.

:information_source: 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.

Obtain the API key

  1. Go to console.anthropic.com and sign up or log in to your Anthropic account
  2. Add a payment method and agree to their pricing and terms
  3. Navigate to API Keys and create a new key
  4. Once the key is created, store it in a safe and secure place and copy it

Add the API key as an AI Secret

API keys in Discourse AI are managed through a centralized Secrets system. You must first add your key as a secret before you can use it with an LLM.

  1. Go to Admin β†’ Plugins β†’ AI β†’ Secrets tab
  2. Click + New Secret
  3. Give it a descriptive name (e.g. β€œAnthropic API Key”)
  4. Paste your API key into the secret field
  5. Save the secret

Configure a Claude LLM

  1. Go to Admin β†’ Plugins β†’ AI β†’ LLMs tab
  2. Find the Claude model you want to configure from the preconfigured templates list (e.g. Claude Sonnet 4.6, Claude Opus 4.6, Claude Haiku 4.5)
  3. Click the Configure button next to the model
  4. Select the secret you created above from the API Key dropdown
  5. Save the LLM

Last edited by @pedro 2024-08-01T03:40:27Z

Check documentPerform check on document:
6 Likes