Skip to main content

Anthropic

Use Claude models from Anthropic as the LLM for your agents.

Get an API key

Sign up at console.anthropic.com and create an API key under API Keys.

Setup

# 1. Store the key
pai add secret anthropic-key --from-literal api-key=sk-ant-...

# 2. Create a model binding
pai apply -f - <<EOF
apiVersion: pai.io/v1
kind: ModelBinding
metadata:
name: claude-sonnet
spec:
provider: anthropic
model: claude-sonnet-4-6
maxTokensPerDay: 500000
maxTokensPerRequest: 16000
apiKeySecretRef:
name: anthropic-key
key: api-key
EOF

Supported models

Modelmodel valueBest for
Claude Sonnet 4.6claude-sonnet-4-6Best overall — reasoning, coding, analysis
Claude Haiku 4.5claude-haiku-4-5-20251001Fast, lightweight tasks
Claude Opus 4.6claude-opus-4-6Most capable, complex multi-step tasks

Use in an agent

spec:
modelBindings:
- claude-sonnet