Anthropic
Set up the Anthropic API as an add-on provider or a preferred provider, and understand how it differs from Claude Code's own login.
Own login or API key?
Claude Code's own login (for example a Claude subscription) needs no provider entry and is used by default. Add Anthropic with an API key when you want tasks billed to an API account, as a fallback when the subscription limit is reached, or for OpenCode and Aider.
Set up
- Create an API key in the Anthropic console.
- Worker UI → AI models → Add → Anthropic (API key).
- Paste the key; optionally list models, for example
claude-sonnet-4-5. - Save, then check the provider shows as healthy with its model list.
Prefer it in a policy
Project policy
{ "models": { "preferred": [{ "providerId": "anthropic", "modelId": "claude-sonnet-4-5" }] } }Troubleshooting
- Unhealthy with 401: the key is wrong or revoked; paste a new one.
- Limited: the account hit a rate limit; the provider becomes usable again after a later successful check.