Anthropic Python SDK

0.84.0 · active · verified Sat Feb 28

Official Python SDK for the Anthropic API providing access to Claude models. Current version is 0.84.0 (Feb 2026). Releases approximately weekly. Two separate packages exist: anthropic (core SDK) and claude-agent-sdk-python (agent workflows).

Warnings

Install

Imports

Quickstart

Minimal message call using the Anthropic SDK 0.84.x.

from anthropic import Anthropic

client = Anthropic()  # reads ANTHROPIC_API_KEY from env
message = client.messages.create(
    model='claude-opus-4-6',
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "Hello, Claude"}
    ]
)
print(message.content[0].text)

view raw JSON →