| name | anth-install-auth |
| description | Install and configure Anthropic Claude SDK authentication for Python and TypeScript.
Use when setting up a new Claude API integration, configuring API keys,
or initializing the Anthropic SDK in your project.
Trigger with phrases like "install anthropic", "setup claude api",
"anthropic auth", "configure anthropic API key", "claude sdk setup".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(pip:*), Grep |
| version | 1.6.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","ai","anthropic"] |
| compatibility | Designed for Claude Code |
Anthropic Install & Auth
Overview
Set up the official Anthropic SDK for Python or TypeScript and configure API key authentication. The SDK wraps the Claude Messages API at https://api.anthropic.com/v1/messages.
Prerequisites
- Node.js 18+ or Python 3.8+
- Package manager (npm, pnpm, yarn, or pip)
- Anthropic account with API access at console.anthropic.com
- API key from Console > API Keys
Instructions
Step 1: Install SDK
pip install anthropic
npm install @anthropic-ai/sdk
pnpm add @anthropic-ai/sdk
Step 2: Configure API Key
export ANTHROPIC_API_KEY="sk-ant-api03-..."
echo 'ANTHROPIC_API_KEY=sk-ant-api03-your-key-here' >> .env
echo $ANTHROPIC_API_KEY | head -c 15
Step 3: Verify Connection (Python)
import anthropic
client = anthropic.Anthropic()
message = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=64,
messages=[{"role": "user", "content": "Say hello in exactly 5 words."}]
)
print(message.content[0].text)
print(f"Model: {message.model}, Tokens: {message.usage.input_tokens}+{message.usage.output_tokens}")
Step 4: Verify Connection (TypeScript)