Anthropic (Claude)
The Anthropic plugin provides access to Claude models.
Installation
Section titled “Installation”<dependency> <groupId>com.google.genkit</groupId> <artifactId>genkit-plugin-anthropic</artifactId> <version>1.0.0-SNAPSHOT</version></dependency>Configuration
Section titled “Configuration”export ANTHROPIC_API_KEY=your-api-keyimport com.google.genkit.plugins.anthropic.AnthropicPlugin;
Genkit genkit = Genkit.builder() .plugin(AnthropicPlugin.create()) .build();
ModelResponse response = genkit.generate( GenerateOptions.builder() .model("anthropic/claude-sonnet-4-5-20250929") .prompt("Tell me about AI") .build());Available models
Section titled “Available models”Claude 4.5 family
Section titled “Claude 4.5 family”anthropic/claude-opus-4-5-20251101anthropic/claude-sonnet-4-5-20250929anthropic/claude-haiku-4-5-20251001
Claude 4 family
Section titled “Claude 4 family”anthropic/claude-4-*
Claude 3 family
Section titled “Claude 3 family”anthropic/claude-3-opus-*anthropic/claude-3-sonnet-*anthropic/claude-3-haiku-*
Features
Section titled “Features”- Text generation
- Streaming
- Tool calling
Sample
Section titled “Sample”See the anthropic sample.