claude-api
Installation
SKILL.md
Calling the Claude API
Use the official Anthropic SDK for the language you are in (anthropic for Python, @anthropic-ai/sdk for TypeScript), or raw HTTP only when there is no SDK or the request is explicitly a cURL/REST one. Never mix the two, and never swap in an OpenAI-compatible shim. Read the API key from a 3B credential or connector rather than hardcoding it.
Connector URLs and authentication
For Anthropic and Microsoft Foundry Claude connectors, pass a placeholder API key; the proxy injects the real key. Keep the saved connector URL including /v1 for connection tests and credential injection. The official SDK appends /v1, so remove only that suffix when constructing its client, preserving gateway prefixes such as /anthropic:
const client = new Anthropic({
baseURL: process.env.ANTHROPIC_BASE_URL!.trim().replace(/\/v1\/?$/, ""),
apiKey: "placeholder",
});