Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/anthropic-sdk-python
/ functions
Functions
1,183 in github.com/anthropics/anthropic-sdk-python
⨍
Functions
1,183
◇
Types & classes
417
↳
Endpoints
7
Method
astream_to_file
( self, file: str | os.PathLike[str], *, chunk_size: int | None = None, )
src/anthropic/_legacy_response.py:499
Function
async_client
(request: FixtureRequest)
tests/conftest.py:45
Function
async_to_custom_raw_response_wrapper
Higher order function that takes one of our bound API methods and an `APIResponse` class and wraps the method to support returning the given respo
src/anthropic/_response.py:834
Function
async_to_custom_streamed_response_wrapper
Higher order function that takes one of our bound API methods and an `APIResponse` class and wraps the method to support streaming and returning t
src/anthropic/_response.py:752
Function
async_to_raw_response_wrapper
Higher order function that takes one of our bound API methods and wraps it to support returning the raw `APIResponse` object directly.
src/anthropic/_response.py:794
Function
async_to_raw_response_wrapper
Higher order function that takes one of our bound API methods and wraps it to support returning the raw `APIResponse` object directly.
src/anthropic/_legacy_response.py:392
Method
auth_headers
(self)
src/anthropic/_base_client.py:603
Method
auth_headers
(self)
src/anthropic/_client.py:137
Method
auth_headers
(self)
src/anthropic/_client.py:357
Method
base_url
(self)
src/anthropic/_base_client.py:639
Method
batches
(self)
src/anthropic/resources/beta/messages/messages.py:55
Method
batches
(self)
src/anthropic/resources/beta/messages/messages.py:1231
Method
batches
(self)
src/anthropic/resources/beta/messages/messages.py:2415
Method
batches
(self)
src/anthropic/resources/beta/messages/messages.py:2431
Method
batches
(self)
src/anthropic/resources/beta/messages/messages.py:2447
Method
batches
(self)
src/anthropic/resources/beta/messages/messages.py:2463
Method
batches
(self)
src/anthropic/resources/messages/messages.py:63
Method
batches
(self)
src/anthropic/resources/messages/messages.py:1213
Method
batches
(self)
src/anthropic/resources/messages/messages.py:2372
Method
batches
(self)
src/anthropic/resources/messages/messages.py:2388
Method
batches
(self)
src/anthropic/resources/messages/messages.py:2404
Method
batches
(self)
src/anthropic/resources/messages/messages.py:2420
Method
build_request
(options: FinalRequestOptions)
tests/test_client.py:1062
Method
cancel
Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at whi
src/anthropic/resources/beta/messages/batches.py:282
Method
cancel
Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at whi
src/anthropic/resources/beta/messages/batches.py:651
Method
cancel
Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at whi
src/anthropic/resources/messages/batches.py:507
Method
charset_encoding
(self)
src/anthropic/_legacy_response.py:428
Function
client
(request: FixtureRequest)
tests/conftest.py:35
Method
close
Close the response and release the connection. Automatically called if the response body is read to completion.
src/anthropic/_response.py:484
Method
close
(self)
src/anthropic/_legacy_response.py:478
Method
construct
( # type: ignore cls, _fields_set: set[str] | None = None, **values: Unpack[FinalRequ
src/anthropic/_models.py:809
Method
content
Return the binary response content. NOTE: this will be removed in favour of `.read()` in the next major version.
src/anthropic/_legacy_response.py:170
Method
content
(self)
src/anthropic/_legacy_response.py:416
Method
copy
Create a new client instance re-using the same options given to the current client with optional overriding.
src/anthropic/lib/bedrock/_client.py:333
Method
count_tokens
Count the number of tokens in a Message. The Token Count API can be used to count the number of tokens in a Message, includi
src/anthropic/resources/beta/messages/messages.py:997
Method
count_tokens
Count the number of tokens in a Message. The Token Count API can be used to count the number of tokens in a Message, includi
src/anthropic/resources/beta/messages/messages.py:2171
Method
count_tokens
Count the number of tokens in a Message. The Token Count API can be used to count the number of tokens in a Message, includi
src/anthropic/resources/messages/messages.py:2142
Method
create
[Legacy] Create a Text Completion. The Text Completions API is a legacy API. We recommend using the [Messages API](https://d
src/anthropic/resources/completions.py:432
Method
create
Send a batch of Message creation requests. The Message Batches API can be used to process multiple Messages API requests at
src/anthropic/resources/beta/messages/batches.py:54
Method
create
Send a batch of Message creation requests. The Message Batches API can be used to process multiple Messages API requests at
src/anthropic/resources/beta/messages/batches.py:423
Method
create
Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversa
src/anthropic/resources/beta/messages/messages.py:78
Method
create
Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversa
src/anthropic/resources/beta/messages/messages.py:1254
Method
create
Send a batch of Message creation requests. The Message Batches API can be used to process multiple Messages API requests at
src/anthropic/resources/messages/batches.py:50
Method
create
Send a batch of Message creation requests. The Message Batches API can be used to process multiple Messages API requests at
src/anthropic/resources/messages/batches.py:335
Method
create
Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversa
src/anthropic/resources/messages/messages.py:86
Method
create
Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversa
src/anthropic/resources/messages/messages.py:1236
Method
current_message_snapshot
(self)
src/anthropic/lib/streaming/_beta_messages.py:108
Method
current_message_snapshot
(self)
src/anthropic/lib/streaming/_beta_messages.py:245
Method
current_message_snapshot
(self)
src/anthropic/lib/streaming/_messages.py:108
Method
current_message_snapshot
(self)
src/anthropic/lib/streaming/_messages.py:245
Method
custom_auth
(self)
src/anthropic/_base_client.py:599
Method
data
(self)
src/anthropic/_streaming.py:288
Method
default_headers
(self)
src/anthropic/_base_client.py:607
Method
default_headers
(self)
src/anthropic/_client.py:160
Method
default_headers
(self)
src/anthropic/_client.py:380
Method
default_query
(self)
src/anthropic/_base_client.py:618
Method
delete
( self, path: str, *, cast_to: Type[ResponseT], body: Body | None = No
src/anthropic/_base_client.py:1875
Method
delete
Delete a Message Batch. Message Batches can only be deleted once they've finished processing. If you'd like to delete an in-
src/anthropic/resources/beta/messages/batches.py:230
Method
delete
Delete a Message Batch. Message Batches can only be deleted once they've finished processing. If you'd like to delete an in-
src/anthropic/resources/beta/messages/batches.py:599
Method
delete
Delete a Message Batch. Message Batches can only be deleted once they've finished processing. If you'd like to delete an in-
src/anthropic/resources/messages/batches.py:184
Method
delete
Delete a Message Batch. Message Batches can only be deleted once they've finished processing. If you'd like to delete an in-
src/anthropic/resources/messages/batches.py:469
Method
elapsed
The time taken for the complete request/response cycle to complete.
src/anthropic/_response.py:109
Method
elapsed
The time taken for the complete request/response cycle to complete.
src/anthropic/_legacy_response.py:195
Method
encoding
(self)
src/anthropic/_legacy_response.py:424
Method
event
(self)
src/anthropic/_streaming.py:276
Function
field_is_required
(field: FieldInfo)
src/anthropic/_compat.py:86
Function
file_from_path
(path: str)
src/anthropic/_utils/_utils.py:359
Function
function_has_argument
Returns whether or not the given function has a specific parameter
src/anthropic/_utils/_reflection.py:7
Method
get
( self, path: str, *, cast_to: Type[ResponseT], options: RequestOption
src/anthropic/_base_client.py:1753
Method
get_api_list
( self, path: str, *, model: Type[object], page: Type[SyncPageT],
src/anthropic/_base_client.py:1320
Method
get_api_list
( self, path: str, *, model: Type[_T], page: Type[AsyncPageT],
src/anthropic/_base_client.py:1886
Method
get_final_text
Returns all `text` content blocks concatenated together. > [!NOTE] > Currently the API will only respond with a single content block.
src/anthropic/lib/streaming/_beta_messages.py:83
Method
get_final_text
Returns all `text` content blocks concatenated together. > [!NOTE] > Currently the API will only respond with a single content block.
src/anthropic/lib/streaming/_beta_messages.py:220
Method
get_final_text
Returns all `text` content blocks concatenated together. > [!NOTE] > Currently the API will only respond with a single content block.
src/anthropic/lib/streaming/_messages.py:83
Method
get_final_text
Returns all `text` content blocks concatenated together. > [!NOTE] > Currently the API will only respond with a single content block.
src/anthropic/lib/streaming/_messages.py:220
Method
get_next_page
(self: AsyncPageT)
src/anthropic/_base_client.py:314
Function
get_required_header
(headers: HeadersLike, header: str)
src/anthropic/_utils/_utils.py:365
Method
headers
(self)
src/anthropic/_response.py:83
Method
headers
(self)
src/anthropic/_legacy_response.py:150
Method
http_request
Returns the httpx Request instance associated with the current response.
src/anthropic/_response.py:87
Method
http_request
(self)
src/anthropic/_legacy_response.py:154
Method
http_version
(self)
src/anthropic/_response.py:105
Method
http_version
(self)
src/anthropic/_legacy_response.py:187
Function
inner
(func: CallableT)
src/anthropic/_utils/_utils.py:229
Method
is_closed
(self)
src/anthropic/_legacy_response.py:191
Method
is_closed
(self)
src/anthropic/_base_client.py:871
Method
is_closed
(self)
src/anthropic/_base_client.py:1457
Function
is_sequence
(obj: object)
src/anthropic/_utils/_utils.py:144
Function
is_tuple
(obj: object)
src/anthropic/_utils/_utils.py:136
Method
iter_bytes
A byte-iterator over the decoded response content. This automatically handles gzip, deflate and brotli encoded responses.
src/anthropic/_response.py:491
Method
iter_bytes
Given an iterator that yields raw binary data, iterate over it & yield every event encountered
src/anthropic/_streaming.py:406
Method
iter_bytes
Given an iterator that yields lines, iterate over it & yield every event encountered
src/anthropic/lib/bedrock/_stream_decoder.py:30
Method
iter_lines
Like `iter_text()` but will only yield chunks for each line
src/anthropic/_response.py:401
Method
iter_lines
Like `iter_text()` but will only yield chunks for each line
src/anthropic/_response.py:508
Method
iter_lines
(self)
src/anthropic/_legacy_response.py:443
Method
iter_raw
(self, chunk_size: int | None = None)
src/anthropic/_legacy_response.py:446
Method
iter_text
A str-iterator over the decoded response content that handles both gzip, deflate, etc but also detects the content's string encoding.
src/anthropic/_response.py:393
Method
iter_text
A str-iterator over the decoded response content that handles both gzip, deflate, etc but also detects the content's string encoding.
src/anthropic/_response.py:500
Method
iter_text
(self, chunk_size: int | None = None)
src/anthropic/_legacy_response.py:440
Method
json
Read and decode the JSON response content.
src/anthropic/_response.py:479
← previous
next →
501–600 of 1,183, ranked by callers