Skip to main content
Use Claude models through Azure AI Foundry. This uses Anthropic’s native Messages API instead of the chat completions endpoint that Azure AI Foundry uses for other models.

Installation

Authentication

Set your ANTHROPIC_FOUNDRY_API_KEY and ANTHROPIC_FOUNDRY_RESOURCE environment variables.
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:
You can also use the string syntax:
View more examples here.

Parameters

Claude (Azure AI Foundry) extends the Anthropic Claude model with Azure AI Foundry integration and has access to most of the same parameters.