// STATUS: UNVERIFIED — no cloud credentials in this atlas; snippet follows official docs verbatim-ish // Source: https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai (retrieved 2026-09-18) // Install: npm install @anthropic-ai/vertex-sdk // Auth: goes through the standard google-auth-library ADC flow. Env: ANTHROPIC_VERTEX_PROJECT_ID, CLOUD_ML_REGION. import { AnthropicVertex } from "@anthropic-ai/vertex-sdk"; const client = new AnthropicVertex({ projectId: process.env.ANTHROPIC_VERTEX_PROJECT_ID, region: process.env.CLOUD_ML_REGION ?? "global", }); const message = await client.messages.create({ model: "claude-haiku-4-5@20251001", // cheapest Haiku 4.5 id on Google Cloud max_tokens: 8, messages: [{ role: "user", content: "Reply with OK." }], }); const textBlock = message.content.find((block) => block.type === "text"); if (textBlock && textBlock.type === "text") console.log(textBlock.text);