Tools/anthropics/anthropic-sdk-python

anthropic-sdk-python

Official Python SDK for the Anthropic API (Claude models).

3.8k+15/wkemergingPythonMIT Licensenew release v0.120.2

The Lens

By Erik Loyd, SaaS CEO and former COO/CFO of an AWS Premier Partner.

Updated Mar 2026

The Anthropic Python SDK is the official way to build with Claude: agents, content pipelines, code assistants. It handles authentication, streaming, tool use, message formatting, and all the API plumbing so you write application logic instead of HTTP requests.

It's free to install and use. The SDK itself costs nothing. You pay for the Claude API calls you make through it. Streaming, tool use, vision, and batch processing are all supported out of the box. Type hints are excellent, which matters when you're building complex agent flows.

The catch: this is the SDK, not the API. Your costs come from Anthropic's API pricing. Claude 3.5 Sonnet runs about $3/$15 per million input/output tokens. The SDK is tightly coupled to Anthropic's models. If you want multi-provider support, you'll need something like LangChain or LiteLLM on top. And breaking changes between SDK versions happen, so pin your version.

Free vs Self-Hosted vs Paid

fully free

The SDK is fully open source under MIT. Free to install, free to use. The cost is entirely in the API usage:

  • Claude 3.5 Sonnet: ~$3/M input tokens, ~$15/M output tokens
  • Claude 3 Opus: ~$15/M input, ~$75/M output
  • Claude 3.5 Haiku: ~$0.25/M input, ~$1.25/M output

For a solo developer building a chatbot that handles 1,000 conversations/month, expect $10-50/mo in API costs depending on the model. For a production app with thousands of users, costs scale linearly with usage.

There's no free API tier from Anthropic; you pay from the first token. But the SDK itself adds zero cost on top.

SDK is free. You pay Anthropic's API rates, starts around $3/M tokens for Sonnet.

Self-hosting ops:trivial
View pricing page →

Get tools like this every Wednesday

One featured tool, three on the radar. No fluff.

Similar Tools

Score
83/100 · A
Adoption17/30
Maintenance25/25
Community16/20
License15/15
Analysis10/10

A low score is not a verdict on quality. Young and niche tools start low by design. How we calculate scores

Trust Signals

Community discussions enabledOrganization account (77 public repos)Notable author: 38,594 followersBacked by: Google, Spark Capital

License: MIT License

Use freely, including commercial. Just keep the license.

Commercial use: ✓ Yes

About

Owner
Anthropic (Organization)
Backed by
Google, Spark Capital
Stars
3,799
Forks
799
Reddit
discussed

Explore Further

More tools in the directory