ModelRefs / Anthropic Python SDK — AI Glossary

Anthropic Python SDK — AI Glossary

The official Python client library for the Anthropic API, providing typed message creation, streaming, and tool use helpers.

Overview

anthropic-python provides: client.messages.create() (sync/async), streaming via with client.messages.stream(), ToolUseBlock parsing helpers, prompt caching parameters (cache_control), and computer use content block types. Similar design to openai-python; migrating between them requires adapting the messages format and role structure.

Reference details

Topicecosystem
Also known asanthropic Python library
Last reviewed2026-06-24

Commonly confused with

The counterpart to the OpenAI client, and not interchangeable with it. The Messages API differs structurally — the system prompt is a top-level field rather than the first message — so porting code between the two is a real change, not a base-URL swap. Gateways translate between them; hand-rolled ports frequently drop the system prompt silently.

Continue your research

Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Anthropic Python SDK — AI Glossary.

Frequently asked questions

What is Anthropic Python SDK?

The official Python client library for the Anthropic API, providing typed message creation, streaming, and tool use helpers.

Is Anthropic Python SDK the same as anthropic Python library?

Yes — anthropic Python library are common aliases for Anthropic Python SDK.

What concepts are related to Anthropic Python SDK?

Closely related concepts include openai sdk, sdk, anthropic api.