Anthropic

Configure Anthropic (Claude models) as an LLM provider in agentgateway.

Configuration

Review the following example configuration.
binds:
- port: 3000
  listeners:
  - routes:
    - backends:
      - ai:
          name: anthropic
          provider:
            anthropic:
              model: claude-3-5-haiku-20241022
      policies:
        backendAuth:
          key: "$ANTHROPIC_API_KEY"
Review the following example configuration.
Setting Description
ai.name The name of the LLM provider for this AI backend.
ai.provider.anthropic.model Optionally set the model to use for requests. If set, any models in the request are overwritten. If not set, the request must include the model to use.
backendAuth Anthropic uses API keys for authentication. Optionally configure a policy to attach an API key that authenticate to the LLM provider to outgoing requests. If you do not include an API key, each request must pass in a valid API key.