//
Search across all documentation pages
7 pages in this section.
Understand how Anthropic() and AsyncAnthropic() clients, retries, and streaming fit together in the official Anthropic Python SDK.
Install anthropic, create a client, and send your first Messages API request.
Compare sync and async clients for FastAPI, scripts, and concurrent workloads.
Use client.messages.stream() and text_stream to render tokens as they arrive.
Compare max_retries, timeout, and with_options() settings across sync and async clients.
Map RateLimitError, APIConnectionError, and APIStatusError to retry-safe handling strategies.
A field-tested checklist for sync/async usage, retries, streaming, and error handling.