> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure AI Foundry Claude

> Use Claude models through Azure AI Foundry with Agno agents.

Use Claude models through Azure AI Foundry. This uses Anthropic's native Messages API instead of the chat completions endpoint that [Azure AI Foundry](https://agno-v2.mintlify.site/models/providers/cloud/azure-ai-foundry/overview.md) uses for other models.

## Installation

```bash theme={null}
uv pip install -U anthropic agno
```

## Authentication

Set your `ANTHROPIC_FOUNDRY_API_KEY` and `ANTHROPIC_FOUNDRY_RESOURCE` environment variables.

```bash Mac theme={null}
export ANTHROPIC_FOUNDRY_API_KEY=***
export ANTHROPIC_FOUNDRY_RESOURCE=***
```

```bash Windows theme={null}
setx ANTHROPIC_FOUNDRY_API_KEY ***
setx ANTHROPIC_FOUNDRY_RESOURCE ***
```

Authenticate with an Azure AD token provider instead of an API key by passing `azure_ad_token_provider` to the `Claude` constructor.

## Example

Use `Claude` with your `Agent`:

```python agent.py theme={null}
from agno.agent import Agent
from agno.models.azure.claude import Claude

agent = Agent(
    model=Claude(id="claude-sonnet-4-6"),
)

# Print the response on the terminal
agent.print_response("Share a 2 sentence dramatic story.")
```

You can also use the string syntax:

```python theme={null}
agent = Agent(model="azure-foundry-claude:claude-sonnet-4-6")
```

> [!NOTE]
>
> View more examples [here](https://agno-v2.mintlify.site/models/providers/cloud/azure-foundry-claude/usage/basic.md).

## Parameters

| Parameter | Type | Default | Description |
| - | - | - | - |
| `id` | `str` | `"claude-sonnet-4-5"` | The specific Azure Foundry Claude model ID to use |
| `name` | `str` | `"AzureFoundryClaude"` | The name identifier for the model |
| `provider` | `str` | `"AzureFoundry"` | The provider of the model |
| `resource` | `str` | `None` | The Azure resource name (or set `ANTHROPIC_FOUNDRY_RESOURCE`) |
| `base_url` | `str` | `None` | The base URL, used instead of `resource` (or set `ANTHROPIC_FOUNDRY_BASE_URL`) |
| `azure_ad_token_provider` | `Callable` | `None` | Azure AD token provider for authentication |
| `max_retries` | `int` | `None` | Maximum number of retries for failed requests |

`Claude` (Azure AI Foundry) extends the [Anthropic Claude](https://agno-v2.mintlify.site/models/providers/native/anthropic/overview.md) model with Azure AI Foundry integration and has access to most of the same parameters.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.