You can get an API key from the Anthropic console.

How to Set Up Anthropic Chat Models

We recommend configuring Claude 4 Sonnet as your chat model.
config.yaml
models:
  - name: Claude 4 Sonnet
    provider: anthropic
    model: claude-sonnet-4-20250514
    apiKey: <YOUR_ANTHROPIC_API_KEY>

Anthropic Autocomplete Model Availability

Anthropic currently does not offer any autocomplete models. Click here to see a list of autocomplete model providers.

Anthropic Embeddings Model Availability

Anthropic currently does not offer any embeddings models. Click here to see a list of embeddings model providers.

Anthropic Reranking Model Availability

Anthropic currently does not offer any reranking models. Click here to see a list of reranking model providers.

How to Enable Prompt Caching with Claude

Anthropic supports prompt caching with Claude, which allows Claude models to cache system messages and conversation history between requests to improve performance and reduce costs. Prompt caching is generally available for:
  • Claude 4 Sonnet
  • Claude 3.7 Sonnet
  • Claude 3.5 Sonnet
  • Claude 3.5 Haiku
To enable caching of the system message and the turn-by-turn conversation, update your model configuration as follows:
config.yaml
models:
  - name: Anthropic
    provider: anthropic
    model: claude-sonnet-4-20250514
    apiKey: <YOUR_ANTHROPIC_API_KEY>
    roles:
      - chat
    defaultCompletionOptions:
      promptCaching: true