Follow Discord
Sweep 27 Oct 2026 · 19:04Z Build v2.1.312 531 read Stable v2.1.308 Latest v2.1.312 Next v2.1.312 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

claude-in-microsoft-foundry changedbuild-with-claude/claude-in-microsoft-foundry

Nearest release: v2.1.312, published under an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+19added
Lines−19removed
From line 4 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits40to this page, all time

The whole hunk

from line 4, old and new numbered
/
lines
from line 4
44description: Access Claude models through Microsoft Foundry with Azure-native endpoints and authentication.
55---
66 
7This guide shows you how to set up and make API calls to Claude in Microsoft Foundry using one of Anthropic's client SDKs or direct HTTP requests. When you access Claude in Microsoft Foundry, you are billed for Claude usage in the Azure Marketplace. You can use Claude models including Claude Fable 5.1, Claude Opus 5.5, Claude Opus 5, Claude Opus 4.8, Claude Sonnet 5.5, Claude Sonnet 5, and Claude Haiku 5.5, and features such as the [1M-token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows), while managing costs through your Azure subscription.
7This guide shows you how to set up and make API calls to Claude in Microsoft Foundry using one of Anthropic’s client SDKs or direct HTTP requests. When you access Claude in Microsoft Foundry, you are billed for Claude usage in the Azure Marketplace. You can use Claude models including Claude Fable 5.1, Claude Opus 5.5, Claude Opus 5, Claude Opus 4.8, Claude Sonnet 5.5, Claude Sonnet 5, and Claude Haiku 5.5, and features such as the [1M-token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows), while managing costs through your Azure subscription.
88 
99Claude is available in Global Standard and US Data Zone Standard deployment types in Foundry resources, billed in Claude Consumption Units through the Azure Marketplace. Visit [Claude in Microsoft Foundry pricing](https://platform.claude.com/docs/en/about-claude/pricing#claude-in-microsoft-foundry-pricing) for details.
1010 
from line 22
2222Claude Sonnet 5.5 supports only Global Standard deployments.
2323 
2424<Note>
25 Anthropic acts as an independent processor for Microsoft. Customers using Claude through Microsoft Foundry are subject to Anthropic's data use terms. For deployments hosted on Azure, prompts and completions remain within Azure. Only usage metadata and content flagged by Anthropic's safety systems egress to Anthropic. Anthropic continues to provide its safety and data commitments.
25 Anthropic acts as an independent processor for Microsoft. Customers using Claude through Microsoft Foundry are subject to Anthropic’s data use terms. For deployments hosted on Azure, prompts and completions remain within Azure. Only usage metadata and content flagged by Anthropic’s safety systems egress to Anthropic. Anthropic continues to provide its safety and data commitments.
2626</Note>
2727 
2828## Prerequisites
from line 36
3636 
3737## Install an SDK
3838 
39Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) support Foundry through a platform-specific package or client class. The examples on this page also show requests with cURL and the `ant` CLI. To set up the CLI, see [CLI quickstart](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart).
39Anthropic’s [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) support Foundry through a platform-specific package or client class. The examples on this page also show requests with cURL and the `ant` CLI. To set up the CLI, see [CLI quickstart](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart).
4040 
4141<Note>
4242 Foundry is supported by the C#, Go, Java, PHP, Python, and TypeScript SDKs. Foundry is not currently available in the Ruby SDK.
from line 129
129129 
130130## Provisioning
131131 
132Foundry uses a two-level hierarchy: **resources** contain your security and billing configuration, whereas **deployments** are the model instances you call through the API. You'll first create a Foundry resource, then create one or more Claude deployments within it.
132Foundry uses a two-level hierarchy: **resources** contain your security and billing configuration, whereas **deployments** are the model instances you call through the API. You’ll first create a Foundry resource, then create one or more Claude deployments within it.
133133 
134134### Provisioning Foundry resources
135135 
from line 141
1411412. Create a new Foundry resource or select an existing one.
1421423. Configure access management using Azure-issued API keys or Entra ID (formerly Azure Active Directory) for role-based access control.
1431434. Optionally configure the resource to be part of a private network (Azure Virtual Network) to restrict network access to your resource.
1445. Note your resource name. You'll use this as `{resource}` in API endpoints (for example, `https://{resource}.services.ai.azure.com/anthropic/v1/*`).
1445. Note your resource name. You’ll use this as `{resource}` in API endpoints (for example, `https://{resource}.services.ai.azure.com/anthropic/v1/*`).
145145 
146146### Creating Foundry deployments
147147 
from line 184
1841843. Copy the **Key** value (and note the **Target URI** for your endpoint).
1851854. Use either the `api-key` or `x-api-key` header in your requests, or provide it to the SDK.
186186 
187The SDK's Foundry client requires an API key and either a resource name or base URL, and automatically reads them from the following environment variables if they are defined:
187The SDK’s Foundry client requires an API key and either a resource name or base URL, and automatically reads them from the following environment variables if they are defined:
188188 
189189* `ANTHROPIC_FOUNDRY_API_KEY` - Your API key
190190* `ANTHROPIC_FOUNDRY_RESOURCE` - Your resource name (for example, `example-resource`)
from line 390
390390 
391391### Microsoft Entra authentication
392392 
393Entra ID authentication lets you manage access with Azure RBAC, integrate with your organization's identity management, and avoid handling API keys manually. To use Entra ID tokens:
393Entra ID authentication lets you manage access with Azure RBAC, integrate with your organization’s identity management, and avoid handling API keys manually. To use Entra ID tokens:
394394 
3953951. Enable [Microsoft Entra ID authentication](https://learn.microsoft.com/en-us/azure/ai-foundry/model-inference/how-to/configure-entra-id) for your Foundry resource.
3963962. Obtain an access token from Entra ID.
from line 720
720720 
721721To move an existing deployment from one hosting option to the other:
722722 
7231. Create a new deployment of the model's other hosting version (Hosted on Azure or Hosted on Anthropic). This can be in the same Foundry resource, or a new one.
7231. Create a new deployment of the model’s other hosting version (Hosted on Azure or Hosted on Anthropic). This can be in the same Foundry resource, or a new one.
7247242. Update your application to pass the new deployment name in the `model` parameter.
7257253. Delete the old deployment once traffic has moved.
726726 
727If the new deployment is in the same Foundry resource, your endpoint URL and authentication are unchanged. If you created a new resource, update your application's endpoint and credentials to point to it.
727If the new deployment is in the same Foundry resource, your endpoint URL and authentication are unchanged. If you created a new resource, update your application’s endpoint and credentials to point to it.
728728 
729729## Monitoring and logging
730730 
from line 737
737737Anthropic recommends logging your activity on at least a 30-day rolling basis to understand usage patterns and investigate any potential issues.
738738 
739739<Note>
740 Azure's logging services are configured within your Azure subscription. Enabling logging does not provide Microsoft or Anthropic access to your content beyond what's necessary for billing and service operation.
740 Azure’s logging services are configured within your Azure subscription. Enabling logging does not provide Microsoft or Anthropic access to your content beyond what’s necessary for billing and service operation.
741741</Note>
742742 
743743## Troubleshooting
from line 746
746746 
747747**Error:** `401 Unauthorized` or `Invalid API key`
748748 
749* **Solution:** Verify your API key is correct. You can find it in the Foundry portal on your deployment's **Details** tab (under **Build** > **Models**).
750* **Solution:** If using Microsoft Entra ID, ensure your access token is valid and hasn't expired. Tokens typically expire after 1 hour.
749* **Solution:** Verify your API key is correct. You can find it in the Foundry portal on your deployment’s **Details** tab (under **Build** > **Models**).
750* **Solution:** If using Microsoft Entra ID, ensure your access token is valid and hasn’t expired. Tokens typically expire after 1 hour.
751751 
752752**Error:** `403 Forbidden`
753753 
from line 757
757757 
758758**Error:** `429 Too Many Requests`
759759 
760* **Solution:** You've exceeded your rate limit. Implement exponential backoff and retry logic in your application.
760* **Solution:** You’ve exceeded your rate limit. Implement exponential backoff and retry logic in your application.
761761* **Solution:** Consider requesting rate limit increases through the Azure portal or Azure support.
762762 
763763#### Rate limit headers
764764 
765Foundry does not include Anthropic's standard rate limit headers (`anthropic-ratelimit-tokens-limit`, `anthropic-ratelimit-tokens-remaining`, `anthropic-ratelimit-tokens-reset`, `anthropic-ratelimit-input-tokens-limit`, `anthropic-ratelimit-input-tokens-remaining`, `anthropic-ratelimit-input-tokens-reset`, `anthropic-ratelimit-output-tokens-limit`, `anthropic-ratelimit-output-tokens-remaining`, and `anthropic-ratelimit-output-tokens-reset`) in responses. Manage rate limiting through Azure's monitoring tools instead.
765Foundry does not include Anthropic’s standard rate limit headers (`anthropic-ratelimit-tokens-limit`, `anthropic-ratelimit-tokens-remaining`, `anthropic-ratelimit-tokens-reset`, `anthropic-ratelimit-input-tokens-limit`, `anthropic-ratelimit-input-tokens-remaining`, `anthropic-ratelimit-input-tokens-reset`, `anthropic-ratelimit-output-tokens-limit`, `anthropic-ratelimit-output-tokens-remaining`, and `anthropic-ratelimit-output-tokens-reset`) in responses. Manage rate limiting through Azure’s monitoring tools instead.
766766 
767767### Model and deployment errors
768768 
769769**Error:** `Model not found` or `Deployment not found`
770770 
771* **Solution:** Verify you're using the correct deployment name. If you haven't created a custom deployment, use the default model ID (for example, claude-opus-5-5).
771* **Solution:** Verify you’re using the correct deployment name. If you haven’t created a custom deployment, use the default model ID (for example, claude-opus-5-5).
772772* **Solution:** Ensure the model/deployment is available in your Azure region.
773773 
774774**Error:** `Invalid model parameter`
from line 779
779779 
780780<CardGroup cols={2}>
781781 <Card title="Features overview" icon="stack" href="https://platform.claude.com/docs/en/build-with-claude/overview">
782 Explore Claude's advanced features and capabilities.
782 Explore Claude’s advanced features and capabilities.
783783 </Card>
784784 
785785 <Card title="Pricing" icon="chart" href="https://platform.claude.com/docs/en/about-claude/pricing#claude-in-microsoft-foundry-pricing">
786 Learn about Anthropic's pricing structure for models and features.
786 Learn about Anthropic’s pricing structure for models and features.
787787 </Card>
788788 
789789 <Card title="Model deprecations" icon="arrow-clockwise" href="https://platform.claude.com/docs/en/about-claude/model-deprecations">
from line 799
799799 </Card>
800800 
801801 <Card title="Azure AI Foundry pricing" icon="calculator" href="https://azure.microsoft.com/en-us/pricing/details/ai-foundry/#pricing">
802 View Microsoft's pricing details for Azure AI Foundry.
802 View Microsoft’s pricing details for Azure AI Foundry.
803803 </Card>
804804 
805805 <Card title="Model pricing" icon="table" href="https://platform.claude.com/docs/en/about-claude/pricing#model-pricing">
806 View Anthropic's per-model pricing details.
806 View Anthropic’s per-model pricing details.
807807 </Card>
808808 
809809 <Card title="Azure portal" icon="cloud" href="https://portal.azure.com/">
Feedback