# Anthropic SDK

> Anthropic's own code kit. Your code calls Claude with one short function.

**Field:** Software Development  
**Category:** AI Engineering  
**Also known as:** Anthropic Client SDK, Claude Client SDK, anthropic Python package, @anthropic-ai/sdk

## Think of it like

It is like a phone with one number saved. You tap once, and the call goes through.

## Definition

The Anthropic SDK is Anthropic's own code library for the Claude API. It comes in Python, TypeScript, Java, Go, Ruby, C# and PHP. In Python, you install a package called anthropic. You make a client, then call messages.create with a model and your messages. The library adds your key and the version header. It also tries again when a call fails.

## Example

Emma writes a short Python script with the anthropic package. It reads a support email and asks Claude for a one-line summary. The usage field in the reply shows the tokens it cost.

## Example code

```python
import anthropic

client = anthropic.Anthropic()  # reads ANTHROPIC_API_KEY
message = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=200,
    messages=[{"role": "user", "content": "Hello, Claude"}],
)
print(message.content[0].text)
```

The client reads your key from the environment. One call sends the chat and prints the reply.

## Why it matters

It is the quickest way to reach Claude from code. Typed fields let your editor catch a wrong name before you run it.

## Common mistake

Mixing it up with the Claude Agent SDK. This one sends one message and returns one reply. The Agent SDK runs a whole agent with tools.

## Three principles

- **Seven languages.** Python, TypeScript, Go and more.
- **Key from the environment.** ANTHROPIC_API_KEY by default.
- **Headers done for you.** Version header and retries included.

## Related terms

- [Client SDK](https://learn.benibix.com/term/development/client-sdk)
- [Claude API](https://learn.benibix.com/term/development/claude-api)
- [OpenAI SDK](https://learn.benibix.com/term/development/openai-sdk)
- [Claude Agent SDK](https://learn.benibix.com/term/ai/claude-agent-sdk)
- [Anthropic](https://learn.benibix.com/term/ai/anthropic)
- [Python](https://learn.benibix.com/term/development/python)

![Your code calls one function in the client SDK. The SDK adds the key, builds the web request and sends it to the model's API. The reply comes back through the SDK as a plain object. A dashed arrow from the reply back to your code is labelled: what happens next is your code's job.](https://learn.benibix.com/diagrams/dev-client-sdk.svg)

---

Source: https://learn.benibix.com/term/development/anthropic-sdk
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
