Implement generative AI and agentic solutions 2.1 Build generative applications by using Foundry
A team deployed a Claude model in its Foundry resource and writes its client with the…
Study guide skill: Configure an application to connect to a Foundry project
Question B8-019
A team deployed a Claude model in its Foundry resource and writes its client with the Anthropic SDK. Which base URL should the client be configured with?
Select one answer.
Answer: B
The SDK guidance maps the Anthropic SDK, for Claude models deployed in Foundry, to the /anthropic endpoint on services.ai.azure.com. The /openai/v1 endpoint is for the OpenAI SDK, and the project endpoint is for the Foundry SDK. Agent Framework uses the Responses API on the project endpoint through FoundryChatClient.
Deep dive
How it works
The Foundry SDK overview maps each client library to its endpoint:
- Foundry SDK: thin client over all Foundry project APIs, on the project endpoint https://<resource-name>.services.ai.azure.com/api/projects/<project-name>.
- Agent Framework: multi-agent orchestration that uses the Responses API on the project endpoint, via FoundryChatClient.
- OpenAI SDK: the full OpenAI API surface on https://<resource-name>.openai.azure.com/openai/v1.
- Anthropic SDK: for Anthropic Claude models deployed in Foundry, on https://<resource-name>.services.ai.azure.com/anthropic.
Claude models use a separate /anthropic endpoint and the Anthropic Messages API, not the OpenAI-compatible endpoint. The Messages API itself is at .../anthropic/v1/messages, and the Python sample creates AnthropicFoundry with base_url set to the /anthropic URL. If your organization uses a custom subdomain, it replaces <resource-name>.
The other options, and when you'd use them
- Project endpoint (/api/projects/...): That's the Foundry SDK endpoint, for agents, evaluations and Foundry-specific features.
- openai.azure.com/openai/v1: That's for the OpenAI SDK. Claude models don't use the OpenAI-compatible endpoint.
- Responses API via FoundryChatClient: That's how Agent Framework reaches the project endpoint, not an Anthropic SDK base URL.
Exam tip
Claude + Anthropic SDK = services.ai.azure.com/anthropic. OpenAI SDK = /openai/v1. Foundry SDK = /api/projects/<project>.
References
Last reviewed: