Skip to content

Anthropic

provider: 'anthropic'

The Anthropic provider reaches Claude models through Anthropic's first-party API. To run Claude through your GCP project instead, use Vertex AI; to reach it through an aggregator, use OpenRouter.

Authentication

Get an API key from the Anthropic Console and pass it through extra.apiKey:

ts
{
  provider: 'anthropic',
  model: 'claude-haiku-4-5',
  extra: { apiKey: process.env.ANTHROPIC_API_KEY },
}

Configuration

FieldRequiredDescription
extra.apiKeyRecommendedAnthropic API key. If omitted, the Anthropic client falls back to ANTHROPIC_API_KEY.

Models

Modelmodel
Claude Sonnet 4.6claude-sonnet-4-6
Claude Opus 4.8claude-opus-4-8
Claude Haiku 4.5claude-haiku-4-5

JSON output

On the native Anthropic path, JSON enrichers use structured outputs (output_config.format) for schema-enforced responses. These Claude versions do not accept temperature — maat omits it and relies on the model's deterministic defaults.