Python 88.3%
TypeScript 7.6%
Shell 4.1%
1// STATUS: UNVERIFIED — no cloud credentials in this atlas; snippet follows official docs verbatim-ish2// Source: https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry (retrieved 2026-09-18)3// Install: npm install @anthropic-ai/foundry-sdk (npm install @azure/identity for Entra ID)4// Env: ANTHROPIC_FOUNDRY_API_KEY, ANTHROPIC_FOUNDRY_RESOURCE (or ANTHROPIC_FOUNDRY_BASE_URL).5import AnthropicFoundry from "@anthropic-ai/foundry-sdk";67const client = new AnthropicFoundry({8 apiKey: process.env.ANTHROPIC_FOUNDRY_API_KEY,9 resource: process.env.ANTHROPIC_FOUNDRY_RESOURCE, // -> https://{resource}.services.ai.azure.com/anthropic/10});1112const message = await client.messages.create({13 model: "claude-haiku-4-5", // default deployment name for Haiku 4.514 max_tokens: 8,15 messages: [{ role: "user", content: "Reply with OK." }],16});1718const textBlock = message.content.find((block) => block.type === "text");19if (textBlock && textBlock.type === "text") console.log(textBlock.text);2021// Entra ID alternative (not run here):22// import { DefaultAzureCredential, getBearerTokenProvider } from "@azure/identity";23// const azureADTokenProvider = getBearerTokenProvider(new DefaultAzureCredential(), "https://ai.azure.com/.default");24// new AnthropicFoundry({ resource: process.env.ANTHROPIC_FOUNDRY_RESOURCE, azureADTokenProvider });25