[ ABORT TO HUD ]
SEQ. 1

SDK Installation & Setup

📦 Official SDKs15 min100 BASE XP⌨ HANDS-ON LAB

Official SDK Ecosystem

Anthropic provides first-party SDKs for four languages: Python (anthropic), TypeScript / JavaScript (@anthropic-ai/sdk), Go (anthropic-sdk-go), and Java (anthropic-java).

Python Example

import anthropic

client = anthropic.Anthropic()  # Reads ANTHROPIC_API_KEY from environment

message = client.messages.create(
    model="claude-sonnet-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Explain quantum computing in three sentences."}]
)
print(message.content[0].text)

TypeScript Example

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic();

const message = await client.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Explain quantum computing in three sentences." }]
});
console.log(message.content[0].text);
⌨ HANDS-ON LABInstall the Official SDKs
⭐ +100 XP

Provision both official Anthropic SDKs - Python for data pipelines, TypeScript for your web stack.

1Install the official Python SDK with pip.
2Install the official TypeScript/Node SDK with npm.
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 2 — type "hint" if stuck
SYNAPSE VERIFICATION
QUERY 1 // 2
Which environment variable do all official Anthropic SDKs read by default?
CLAUDE_KEY
ANTHROPIC_API_KEY
AI_SECRET
ANTHROPIC_TOKEN