
anthropic-sdk-python
Official Python SDK for the Anthropic API (Claude models).
The Lens
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 freeThe 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.
Similar Tools
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,134
- Forks
- 589
- discussed
Explore Further
More tools in the directory
Get tools like this delivered weekly
The Open Source Drop — the best new open source tools, analyzed. Free.

