Anthropic Claude API provider
From MoodleDocs
The Anthropic Claude API provider allows you to use Anthropic's Claude models to power Moodle's AI capabilities, such as generating, summarising, and explaining text. Image generation is not supported by the Claude API.
Requirements
You need an Anthropic account with access to a paid API key. See the Anthropic Console for account and billing information.
Anthropic Claude provider instance set-up
To create a provider instance:
- Go to Site administration > General > AI providers.
- Click 'Create a new provider instance'.
- Select Anthropic Claude API provider as AI provider plugin, enter a name for this instance, and enter your Anthropic API key.
- If required, set a site-wide rate limit and/or a user rate limit.
- Click 'Create instance'.

To configure the Anthropic Claude provider instance:
- Go to Site administration > General > AI providers.
- Click the settings link for Anthropic Claude.
- Enable/disable actions as required.
For each action, you can customise the model's behaviour via the settings link.
Generate text, Summarise text and Explain text
- Select the AI model from the preset dropdown list, or choose Custom to enter the name of a model not in the list.
- The API endpoint field is pre-filled automatically. Leave this unchanged unless you are using a custom endpoint.
- Review and amend the system instruction as necessary.
- Enter values for the following settings as required and save changes.
- max_tokens - The maximum number of tokens used in the generated text.
- temperature - Controls the randomness of the generated text. Not available for all models.

To enable the Anthropic Claude provider instance:
- Go to Site administration > General > AI providers.
- Click the toggle to enable the instance.