> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Anthropic

> Use Claude models from Anthropic in your Guild agents: supported models, inference providers, setup, and agent code.

Guild supports Claude models from Anthropic. This page lists the models Guild recognizes, the inference providers that serve them, and how to call them from an agent.

| | |
| - | - |
| Name under **Models** in the credential form | Anthropic |
| `provider` in `llmPreferences` | `"anthropic"` |
| Default model | `claude-sonnet-4-6` |
| Managed access | Yes, when Guild holds a managed key |

## Inference providers

You can reach these models through the Anthropic API itself or through a third-party provider.

| Provider | Notes |
| - | - |
| Anthropic | The publisher's own API. Available on every account. |
| [AWS Bedrock](/platform/providers/aws-bedrock) | Serves current Claude models in all four US regions. |
| [OpenRouter](/platform/providers/openrouter) | Served under OpenRouter's `anthropic/` namespace. |

Write the canonical model name, such as `claude-sonnet-4-6`, everywhere in Guild. Guild maps it to each provider's own model ID.

## Models

Guild prices and recognizes these Anthropic model IDs. A policy or preference can also name any other model your credential can reach. Third-party providers route more models than this list, and their catalogs change; see each provider's page for what it serves.

| Model | Notes |
| - | - |
| `claude-opus-5-5` | |
| `claude-opus-5` | |
| `claude-sonnet-5` | Also matched as `claude-sonnet-5-20260115`. |
| `claude-sonnet-4-6` | The default. |
| `claude-sonnet-4-5-20250929` | |
| `claude-haiku-4-5` | Also matched as `claude-haiku-4-5-20251001`. |
| `claude-fable-5` | |
| `claude-mythos-5` | |
| `claude-opus-4-8` | |
| `claude-opus-4-7` | |
| `claude-opus-4-6` | |
| `claude-opus-4-5` | |
| `claude-opus-4-1` | |
| `claude-opus-4` | |

## Set up Anthropic

On a managed account, agents can use Anthropic models without a credential, as long as Guild holds a managed key for Anthropic. To use your own Anthropic account instead, add a credential. Adding your first credential switches the whole account to bring your own key (BYOK).

<Steps>
  <Step title="Open Models & providers">Click **Access & setup** in the left nav, then **Models & providers**. In an organization, only admins can open it.</Step>
  <Step title="Add a credential">Click **Add API key** and choose an inference provider from the table above.</Step>
  <Step title="Enter the provider's secret">Give the credential a **Name** and paste your provider's **API key**. [AWS Bedrock](/platform/providers/aws-bedrock) asks for an IAM role and region instead.</Step>
  <Step title="Choose Anthropic">Under **Models**, check **Anthropic**. Keep `claude-sonnet-4-6` as its default model or enter another from the list above. Then click **Add Key**.</Step>
</Steps>

To control which workspaces and agents can use Anthropic models, add a [model policy](/platform/llm-settings#model-policies) for the credential. For example, `--models "claude-sonnet-*"` limits a policy to matching models:

```bash theme={null}
guild llm policy create --credential <credential-id> --publisher ANTHROPIC --target-id <workspace-or-agent-id> --models "claude-sonnet-*"
```

## Use it from an agent

Agent code never names a credential. Guild resolves the call against the workspace owner's settings. To ask for Anthropic explicitly, put it in `llmPreferences`:

```typescript theme={null}
const result = await task.llm.generateText({
  prompt: "Summarize this text...",
  llmPreferences: [
    { provider: "anthropic", model: "claude-opus-5-5" },
    { provider: "anthropic" },
  ],
})
```

The first entry asks for `claude-opus-5-5`. The second falls back to the default model of the matching policy. Preferences are strict: if no credential or policy allows any of them, the call fails rather than using another publisher. See [LLM preferences](/guide/llms#llm-preferences).

## Notes

* Guild adds prompt caching to Anthropic calls automatically, unless your request sets its own cache breakpoints.
* When a Claude model uses adaptive thinking, Guild requests summarized thinking so the session can show reasoning progress.
* The Claude Code runtime driver calls the Anthropic API directly through the runtime, so it needs an Anthropic credential or managed Anthropic access.
* On Bedrock, Guild passes only the `anthropic-beta` flags Bedrock accepts, and drops the rest.

## Related pages

* [Models & providers](/platform/llm-settings) for credentials, model policies, and the daily token limit
* [LLMs](/guide/llms) for `task.llm` and the unified LLM proxy
* [Usage](/insights/usage) for spend by model
