Unofficial-claude-api

Latest version: v0.3.3

Safety actively analyzes 715081 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.2.7

CHANGELOG:

- Changed `send_message` response parsing strategy
- `error_response` is now called `raw_answer`, and it holds the `response.content` from the `send_message` response, used for inspections purposes.
- Implemented a new Claude error `OverloadError`

MISCELLANOUS IMPROVEMENTS

- All the api errors now inherits from `ClaudeAPIError`
- Moved errors into `claude2_api.errors`
- Replaced `requests.Session` with `requests.post` in `__prepare_file_attachment`, as the headers were incorrectly set.
- Clarified the error "[400] Unable to prepare file attachment" in the Troubleshotting section of `README.md`

0.2.6

CHANGELOG

- Added `model_name` string parameter into `ClaudeAPIClient` constructor, can be either `claude-2.0` or `claude-2.1`

0.2.5

CHANGELOG

BUGFIX:

File attachments now works correctly. Replaced `curl_cffi` with the `requests` module in `__prepare_file_attachment`, since the `files` parameter is not yet implemented.

0.2.4

CHANGELOG

Added `organization_id` parameter in `SessionData`, if omitted or None it will be retrieved as usual during `ClaudeAPIClient` instantiation.

`claude2_api.session.get_session_data()` now automatically retrieves the organization_uuid to insert into the SessionData class.

(This should allow for permanently fixing the permission error when instantiating `ClaudeAPIClient`, i.e. error retrieving organization id)

0.2.3

CHANGELOG

- BUGFIXES:
- Fixed 403 error by using `curl_cffi` with `impersonate=chrome110` parameter.
- Cookies are now used consistently across requests.
- Fixed json payload length by setting `indent=0, separators=(",", ":")` in `json.dumps()`.

- PLATFORM UPDATE FIXES:
- Updated headers to reflect Claude's platform changes/updates. ( Model was updated to claude-2.1)
- File attachment size limit was decreased to `10MB` for each file.
- Implemented response decoding for `(gzip, deflate, br)`.

- MISCELLANOUS CHANGES:
- Added `timeout` parameter to `ClaudeAPIClient` for setting requests timeout globally.
- `SendMessageResponse.error_response` is now a `str` instead of a `dict` object.
- Clarified the usage of `ClaudeAPIClient.get_chat_data()` in `README.md`
- Updated README.md to reflect new features.

- HOTFIX 0.2.3
- `session` module now uses `selgym` library for auto session gathering ( fixed Firefox path retrieval on Windows ).

0.1.9

CHANGELOG:

- HTTP/S proxies implemented
- Create `HTTPProxy` instance for `ClaudeAPIClient` constructor.

Page 2 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.